input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
givenHappyPath_push_shouldReturnMessageWithMD5OfBody ( ) { com . example . pojo . PushRequest requestMock = mock ( com . example . pojo . PushRequest . class ) ; com . amazonaws . services . sqs . model . SendMessageResult result = new com . amazonaws . services . sqs . model . SendMessageResult ( ) ; result . setMD5Of... | org . junit . Assert . assertEquals ( com . example . service . impl . SqsQueueServiceTest . MESSAGE_BODY_MD5 , md5Body ) |
doesNotCareAboutFileContents ( ) { com . facebook . buck . util . hashing . FilePathHashLoader loader = newFilePathHashLoader ( ) ; com . google . common . hash . HashCode hashBefore = loader . get ( file ) ; java . nio . file . Files . write ( file , "Goodbye!" . getBytes ( ) ) ; com . google . common . hash . HashCod... | org . junit . Assert . assertThat ( hashBefore , org . hamcrest . Matchers . equalTo ( hashAfter ) ) |
testNewPipePartialReadSemantics ( ) { java . nio . channels . Pipe pipe = java . nio . channels . Pipe . open ( ) ; int sz = 10 ; java . nio . ByteBuffer buf = java . nio . ByteBuffer . allocate ( sz ) ; pipe . sink ( ) . write ( java . nio . ByteBuffer . wrap ( "small" . getBytes ( ) ) ) ; int rdSz = pipe . source ( )... | org . junit . Assert . assertTrue ( ( rdSz <= sz ) ) |
testIsRunning ( ) { "<AssertPlaceHolder>" ; } isRunning ( ) { try { return com . skype . Skype . getConnectorInstance ( ) . isRunning ( ) ; } catch ( com . skype . connector . ConnectorException e ) { com . skype . Utils . convertToSkypeException ( e ) ; return false ; } } | org . junit . Assert . assertTrue ( com . skype . Skype . isRunning ( ) ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFNotaInfoTransporte><modFrete>9</modFrete><transporta><CNPJ>34843274000164</CNPJ><xNome>4lb4Qv5yi9oYq7s8fF98a0EEv98oAxl0CIs5gzyKNVp1skE3IHD9Z7JbjHCn</xNome><IE>ISENTO</IE><xEnder>D8nOWsHxI5K4RgYTUGwWgIKajhiUf4Q7aOOmaTV2wnYV0kQ5... | org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe310 . FabricaDeObjetosFake . getNFNotaInfoTransporte ( ) . toString ( ) ) |
testExecute ( ) { System . out . println ( "execute" ) ; final boolean [ ] executed = new boolean [ ] { false } ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; org . netbeans . lib . profiler . ui . SwingWorker instance = new org . netbeans . lib . profile... | org . junit . Assert . assertTrue ( executed [ 0 ] ) |
addISvgNodeRender ( ) { java . lang . String name = "expected" ; com . itextpdf . svg . renderers . ISvgNodeRenderer expected = new com . itextpdf . svg . renderers . impl . GroupSvgNodeRenderer ( ) ; this . context . addNamedObject ( name , expected ) ; java . lang . Object actual = this . context . getNamedObject ( n... | org . junit . Assert . assertEquals ( expected , actual ) |
constructWithUnboxedArrayAtDefaultTickSize ( ) { double a = 4.2 ; double closeToA = net . finmath . time . TimeDiscretizationTest . getHalfTickMore ( a ) ; net . finmath . time . TimeDiscretizationFromArray discretization = new net . finmath . time . TimeDiscretizationFromArray ( a , closeToA ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertThat ( discretization . getAsDoubleArray ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( new double [ ] { a } ) ) ) |
testOperations ( ) { org . openscience . cdk . ringsearch . Queue queue = new org . openscience . cdk . ringsearch . Queue ( ) ; queue . push ( 1 ) ; queue . push ( "Hello" ) ; "<AssertPlaceHolder>" ; } pop ( ) { if ( ! ( apath . isEmpty ( ) ) ) apath . remove ( ( ( apath . size ( ) ) - 1 ) ) ; if ( ! ( bpath . isEmpty... | org . junit . Assert . assertEquals ( 1 , queue . pop ( ) ) |
testInsertChunkHeaderSuccessfull1 ( ) { org . goodoldai . jeff . report . pdf . RTFChunkUtility . insertChunkHeader ( ichunk , doc ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; "<AssertPlaceHolder>" ; java . lang . Object [ ] event = events . get ( 0 ) ; confirm... | org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 4 ) ) |
test_short ( ) { int item_size = 65536 ; short [ ] data = new short [ item_size ] ; for ( int i = 0 ; i < item_size ; i ++ ) { data [ i ] = ( ( short ) ( ( io . indexr . compress . bh . BHCompressTest . random . nextInt ( 65536 ) ) - 32768 ) ) ; } io . indexr . io . ByteSlice bb = io . indexr . io . ByteSlice . allocat... | org . junit . Assert . assertEquals ( true , io . indexr . io . ByteSlice . checkEquals ( bb , dp ) ) |
testSubqueryInOuterJoin ( ) { java . lang . String sql = "select<sp>1<sp>from<sp>tt1<sp>left<sp>join<sp>(select<sp>a2<sp>from<sp>tt2<sp>where<sp>a2<sp>not<sp>in<sp>(select<sp>a3<sp>from<sp>tt3))<sp>dt<sp>on<sp>a1=a2" ; java . lang . String expected = "1<sp>|\n" + ( ( ( ( "----\n" + "<sp>1<sp>|\n" ) + "<sp>1<sp>|\n" ) +... | org . junit . Assert . assertEquals ( expected , TestUtils . FormattedResult . ResultFactory . toString ( rs ) ) |
testFaultSoap11 ( ) { java . lang . String faultSoap11 = org . reficio . ws . legacy . SoapLegacyFacade . buildFault ( SoapLegacyFacade . Soap . SOAP_1_1 , "VersionMismatch" , "Fault<sp>Message" , org . reficio . ws . builder . MessageComplianceTest . context ) ; org . reficio . ws . builder . MessageComplianceTest . l... | org . junit . Assert . assertEquals ( expectedMsg , faultSoap11 ) |
getCharFromResultSet ( ) { au . com . bytecode . opencsv . MockResultSet resultSet = new au . com . bytecode . opencsv . MockResultSet ( ) ; au . com . bytecode . opencsv . MockResultSetMetaData metaData = new au . com . bytecode . opencsv . MockResultSetMetaData ( ) ; java . lang . String [ ] expectedNames = new java ... | org . junit . Assert . assertArrayEquals ( expectedValues , columnValues ) |
sexEqual_sortAgeDescExtra1 ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>sex<sp>=<sp>'male'<sp>ORDER<sp>BY<sp>age<sp>desc<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>where<sp>sex<sp>=<sp>'male'<sp>order<sp>by<sp>age<sp>desc" ; org . apache . usergrid . query . validator ... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
fileTest ( ) { java . io . File file1 = java . io . File . createTempFile ( "file1" , ".txt" ) ; java . io . File archive = java . io . File . createTempFile ( "archive" , ".zip" ) ; file1 . deleteOnExit ( ) ; archive . deleteOnExit ( ) ; org . geotoolkit . nio . ZipUtilities . zip ( archive . toPath ( ) , ZipOutputStr... | org . junit . Assert . assertEquals ( zipContent . get ( 0 ) , file1 . getName ( ) ) |
extract2 ( ) { java . util . Map < com . querydsl . core . types . Path < ? > , java . lang . Object > values = AnnotationMapper . DEFAULT . createMap ( com . querydsl . sql . dml . AnnotationMapperTest . emp , new com . querydsl . sql . dml . EmployeeX ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( values . ... | org . junit . Assert . assertTrue ( values . isEmpty ( ) ) |
testEmptyXMLHelper ( ) { org . pentaho . platform . plugin . action . pentahometadata . MetadataQueryComponent component = new org . pentaho . platform . plugin . action . pentahometadata . MetadataQueryComponent ( ) ; component . setQueryModelXmlHelper ( "NonExistClassName" ) ; "<AssertPlaceHolder>" ; } execute ( ) { ... | org . junit . Assert . assertFalse ( component . execute ( ) ) |
testSaveJavaSourceUnformatted ( ) { org . jboss . forge . addon . projects . Project project = projectFactory . createTempProject ( ) ; org . jboss . forge . addon . parser . java . facets . JavaSourceFacet facet = facetFactory . install ( project , org . jboss . forge . addon . parser . java . facets . JavaSourceFacet... | org . junit . Assert . assertEquals ( data , resource . getContents ( ) ) |
testListIndexesOnSecondary ( ) { final int numIndexes = 60 ; com . allanbank . mongodb . MongoIterator < com . allanbank . mongodb . bson . Document > docsIter = null ; myCollection . insert ( Durability . ACK , com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ) ; for ( int i = 0 ; i ... | org . junit . Assert . assertThat ( count , org . hamcrest . Matchers . greaterThanOrEqualTo ( ( numIndexes + 1 ) ) ) |
testGuideTree ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( tree ) |
testPropagateWhenUnassigningUserFromRoles ( ) { long [ ] userIds = addUsers ( ) ; com . liferay . portal . kernel . service . RoleServiceUtil . unsetUserRoles ( userIds [ 0 ] , addStandardRoles ( ) ) ; "<AssertPlaceHolder>" ; } isPropagateRoles ( ) { return com . liferay . portal . security . membership . policy . Base... | org . junit . Assert . assertTrue ( isPropagateRoles ( ) ) |
removal ( ) { hudson . util . ConsistentHash < java . lang . Integer > hash = new hudson . util . ConsistentHash < java . lang . Integer > ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) hash . add ( i ) ; java . util . Map < java . lang . Integer , java . lang . Integer > before = new java . util . HashMap < java . lang . Int... | org . junit . Assert . assertTrue ( ( ( ( e . getValue ( ) ) == 0 ) || ( ( e . getValue ( ) ) == m ) ) ) |
testGetCharacter ( ) { @ org . simpleflatmapper . reflect . test . asm . SuppressWarnings ( "unchecked" ) org . simpleflatmapper . reflect . primitive . CharacterGetter < org . simpleflatmapper . test . beans . DbPrimitiveObjectWithSetter > getter = ( ( org . simpleflatmapper . reflect . primitive . CharacterGetter < o... | org . junit . Assert . assertEquals ( 'g' , getter . getCharacter ( object ) ) |
setCollaborators ( ) { java . util . Collection < org . phenotips . data . permissions . Collaborator > collaborators = new java . util . HashSet ( ) ; org . phenotips . data . permissions . Collaborator c = new org . phenotips . data . permissions . internal . DefaultCollaborator ( org . phenotips . data . permissions... | org . junit . Assert . assertTrue ( this . component . setCollaborators ( this . entity , collaborators ) ) |
testADDMOD_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "61123414" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { ... | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
testConvertWithNoRelations ( ) { java . lang . String name = "name" ; java . lang . String abbrName = "abbr<sp>name" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . department . Department expected = new org . lnu . is . dom... | org . junit . Assert . assertEquals ( expected , actual ) |
testCreateIosAppShouldSucceed ( ) { when ( iosAppService . createIosApp ( com . google . firebase . projectmanagement . FirebaseProjectManagementTest . TEST_PROJECT_ID , com . google . firebase . projectmanagement . FirebaseProjectManagementTest . TEST_APP_BUNDLE_ID , com . google . firebase . projectmanagement . Fireb... | org . junit . Assert . assertEquals ( com . google . firebase . projectmanagement . FirebaseProjectManagementTest . TEST_APP_ID , iosApp . getAppId ( ) ) |
coercedEitherThrowsOnAccessingMissingLeft ( ) { java . lang . reflect . Type type = com . facebook . buck . rules . coercer . TypeCoercerTest . TestFields . class . getField ( "eitherStringSetOrStringToStringMap" ) . getGenericType ( ) ; com . facebook . buck . rules . coercer . TypeCoercer < ? > coercer = typeCoercerF... | org . junit . Assert . assertEquals ( inputMap , either . getRight ( ) ) |
integrationSetDataGetDataTest ( ) { cloud . artik . model . ActionOut actionOut = new cloud . artik . model . ActionOut ( ) ; cloud . artik . model . ActionDetailsArray actionDetailsArray = new cloud . artik . model . ActionDetailsArray ( ) ; actionOut . setData ( actionDetailsArray ) ; "<AssertPlaceHolder>" ; } getDat... | org . junit . Assert . assertEquals ( actionDetailsArray , actionOut . getData ( ) ) |
testHashCodeWithEqualInstances ( ) { edu . illinois . library . cantaloupe . image . Metadata m1 = new edu . illinois . library . cantaloupe . image . Metadata ( ) ; m1 . setEXIF ( "a" ) ; m1 . setIPTC ( "b" ) ; m1 . setXMP ( "<rdf:RDF>cats</rdf:RDF>" ) ; edu . illinois . library . cantaloupe . image . Metadata m2 = ne... | org . junit . Assert . assertEquals ( m1 . hashCode ( ) , m2 . hashCode ( ) ) |
requestForCurrentRequestIsNull ( ) { org . slim3 . util . RequestLocator . set ( null ) ; "<AssertPlaceHolder>" ; } request ( ) { org . junit . Assert . assertThat ( org . slim3 . jsp . Functions . request ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . notNullValue ( ) ) ) ; } | org . junit . Assert . assertThat ( org . slim3 . jsp . Functions . request ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . notNullValue ( ) ) ) |
website ( ) { colorTheme . setWebsite ( "website" ) ; "<AssertPlaceHolder>" ; } getWebsite ( ) { return website ; } | org . junit . Assert . assertThat ( colorTheme . getWebsite ( ) , org . hamcrest . CoreMatchers . is ( "website" ) ) |
testFindGroupDnById ( ) { org . apache . hive . service . auth . ldap . Query q = queries . findGroupDnById ( "unique_group_id" ) ; java . lang . String expected = "(&(objectClass=superGroups)(guid=unique_group_id))" ; java . lang . String actual = q . getFilter ( ) ; "<AssertPlaceHolder>" ; } getFilter ( ) { return th... | org . junit . Assert . assertEquals ( expected , actual ) |
testConvertToDataModelTypeWithoutStatsWithStatsConverter ( ) { studyEntry . getSamplesData ( ) . clear ( ) ; org . opencb . opencga . storage . mongodb . variant . converters . List < java . lang . String > sampleNames = null ; org . opencb . opencga . storage . mongodb . variant . converters . DocumentToStudyVariantEn... | org . junit . Assert . assertEquals ( studyEntry , converted ) |
test004_GetSWbemServices ( ) { locator . connectServer ( ) ; "<AssertPlaceHolder>" ; } getSWbemServices ( ) { if ( ( services ) == null ) { throw new java . lang . IllegalStateException ( "Please<sp>connect<sp>to<sp>the<sp>server<sp>first." ) ; } return services ; } | org . junit . Assert . assertNotNull ( locator . getSWbemServices ( ) ) |
testRdfAboutFound ( ) { java . io . InputStream fis = org . apache . xmpbox . xml . DomXmpParser . class . getResourceAsStream ( "/validxmp/emptyli.xml" ) ; org . apache . xmpbox . xml . DomXmpParser xdb = new org . apache . xmpbox . xml . DomXmpParser ( ) ; org . apache . xmpbox . XMPMetadata meta = xdb . parse ( fis ... | org . junit . Assert . assertNotNull ( xmpSchema . getAboutAttribute ( ) ) |
testIncludeNullsDefault ( ) { "<AssertPlaceHolder>" ; } includeNulls ( ) { return includeNulls ; } | org . junit . Assert . assertFalse ( builder . includeNulls ( ) ) |
makeCompleteListFutureNullTest ( ) { org . threadly . concurrent . future . ListenableFuture < java . util . List < org . threadly . concurrent . future . ListenableFuture < ? > > > f = org . threadly . concurrent . future . FutureUtils . makeCompleteListFuture ( null ) ; "<AssertPlaceHolder>" ; } isDone ( ) { return t... | org . junit . Assert . assertTrue ( f . isDone ( ) ) |
testCatalogBuilderSample ( ) { org . geotools . gce . imagemosaic . ImageMosaicFormat format = new org . geotools . gce . imagemosaic . ImageMosaicFormat ( ) ; org . geotools . gce . imagemosaic . ImageMosaicReader reader = format . getReader ( org . geotools . TestData . file ( this , "multiresolution" ) ) ; final org... | org . junit . Assert . assertNotNull ( gc ) |
testGetSelectionIndex_WithoutSelection ( ) { "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { result = selectedCells . get ( 0 ) . y ; } } else { if ( ( selectedItems . size ( ) ) != 0 ) { result = items . ind... | org . junit . Assert . assertEquals ( ( - 1 ) , grid . getSelectionIndex ( ) ) |
newPayload ( ) { org . eclipse . kapua . message . device . data . KapuaDataPayload payload = kapuaDataMessageFactory . newKapuaDataPayload ( ) ; "<AssertPlaceHolder>" ; } newKapuaDataPayload ( ) { return org . eclipse . kapua . message . device . data . xml . DataMessageXmlRegistry . KAPUA_DATA_MESSAGE_FACTORY . newKa... | org . junit . Assert . assertNotNull ( payload ) |
appendJsonAttributeGoodCaseQuotedLast ( ) { java . lang . StringBuilder stringBuilder = new java . lang . StringBuilder ( ) ; stringBuilder . append ( "prefix_" ) ; java . lang . String expResult = "prefix_\"keyname\":\"value\"" ; com . microsoft . azure . sdk . iot . deps . util . Tools . appendJsonAttribute ( stringB... | org . junit . Assert . assertEquals ( expResult , stringBuilder . toString ( ) ) |
getField ( ) { com . hevelian . olastic . core . api . uri . queryoption . expression . member . impl . PrimitiveMember primitive = new com . hevelian . olastic . core . api . uri . queryoption . expression . member . impl . PrimitiveMember ( field , annotations ) ; "<AssertPlaceHolder>" ; } getField ( ) { com . heveli... | org . junit . Assert . assertEquals ( field , primitive . getField ( ) ) |
isPublicMethodAndTestingRequired_A$MethodMeta$TestingTarget ( ) { org . junithelper . core . meta . MethodMeta methodMeta = new org . junithelper . core . meta . MethodMeta ( ) ; methodMeta . accessModifier = org . junithelper . core . meta . AccessModifier . Public ; org . junithelper . core . config . TestingTarget t... | org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) ) |
falseAssumption ( ) { org . junit . Assume . assumeFalse ( "5<sp>is<sp>less<sp>then<sp>1" , ( 5 < 1 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ( 5 + 2 ) , 7 ) |
testMessageUtil ( ) { final byte [ ] result = new byte [ ] { com . google . common . primitives . UnsignedBytes . MAX_VALUE , com . google . common . primitives . UnsignedBytes . MAX_VALUE , com . google . common . primitives . UnsignedBytes . MAX_VALUE , com . google . common . primitives . UnsignedBytes . MAX_VALUE ,... | org . junit . Assert . assertArrayEquals ( result , org . opendaylight . protocol . util . ByteArray . getAllBytes ( formattedMessage ) ) |
testMatchesSpace ( ) { org . apache . cloudstack . acl . Rule rule = new org . apache . cloudstack . acl . Rule ( "someString" ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . String ) { return ( ! ( com . google . common . base . Strings . isNullOrEmpty ( commandName ) ) ) && ( commandName . toLowerCase ( ) . mat... | org . junit . Assert . assertFalse ( rule . matches ( "<sp>" ) ) |
getEffectiveStartDate_shouldReturnScheduledDateIfUrgencyIsScheduled ( ) { org . openmrs . Order order = new org . openmrs . Order ( ) ; java . util . Date date = org . apache . commons . lang3 . time . DateUtils . addDays ( new java . util . Date ( ) , 2 ) ; order . setUrgency ( Order . Urgency . ON_SCHEDULED_DATE ) ; ... | org . junit . Assert . assertEquals ( date , order . getEffectiveStartDate ( ) ) |
should_get_testDir ( ) { org . apache . maven . model . Build build = mock ( org . apache . maven . model . Build . class ) ; when ( build . getTestSourceDirectory ( ) ) . thenReturn ( "C:\\dev\\sonar\\plugins\\sonar-scm-stats\\src\\test\\java" ) ; org . apache . maven . project . MavenProject mavenProject = mock ( org... | org . junit . Assert . assertThat ( expectedDir ) |
shouldReturnTransientKeysAtOrBelowNodeWithRemovedChild ( ) { org . modeshape . jcr . cache . NodeKey rootKey = session1 . getRootKey ( ) ; org . modeshape . jcr . cache . MutableCachedNode root = session1 . mutable ( rootKey ) ; org . modeshape . jcr . cache . SessionCache sessionCache = session ( ) ; org . modeshape .... | org . junit . Assert . assertEquals ( new java . util . HashSet < org . modeshape . jcr . cache . NodeKey > ( java . util . Arrays . asList ( rootKey , childKey ) ) , session1 . getChangedNodeKeysAtOrBelow ( root ) ) |
testTest ( ) { logger . info ( "test" ) ; int n11 = 1 ; int n12 = 5 ; int n21 = 4 ; int n22 = 0 ; double aLevel = 0.05 ; boolean expResult = true ; boolean result = com . datumbox . framework . core . statistics . nonparametrics . independentsamples . Fisher . test ( n11 , n12 , n21 , n22 , aLevel ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( expResult , result ) |
testEncodeAndStream ( ) { final java . lang . String text = "The<sp>true<sp>sign<sp>of<sp>intelligence<sp>is<sp>not<sp>knowledge<sp>but<sp>imagination." ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; byte [ ] bytes = text . getBytes ( StandardCharsets . UTF_8 ) ; org . apache . cx... | org . junit . Assert . assertEquals ( decodedText , text ) |
testFindNodeDifference_bothNull ( ) { com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductPartitionNodeDiffer . NodeDifference diff = com . google . api . ads . adwords . axis . utils . v201809 . shopping . ProductPartitionNodeDiffer . diff ( null , null , dimensionComparator ) ; "<AssertPla... | org . junit . Assert . assertEquals ( NodeDifference . NONE , diff ) |
getNationaliteitTestNotExist ( ) { final java . lang . String natCode = "0999" ; org . mockito . Mockito . doThrow ( new java . lang . IllegalArgumentException ( nl . bzk . migratiebrp . ggo . viewer . service . impl . Lo3StamtabelServiceTest . MELDING_STRING ) ) . when ( dynamischeStamtabelRepository ) . getNationalit... | org . junit . Assert . assertEquals ( "0999" , resultNat ) |
retainsValueWhenRenamingParameter ( ) { java . lang . String originalName = "secondParameter" ; com . eviware . soapui . impl . rest . support . RestParamProperty parameter = parametersHolder . addProperty ( originalName ) ; java . lang . String value = "ulysses" ; parameter . setValue ( value ) ; java . lang . String ... | org . junit . Assert . assertThat ( parametersHolder . getProperty ( newName ) . getValue ( ) , org . hamcrest . CoreMatchers . is ( value ) ) |
deveObterIEAtualComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setInscricaoEstadualAtual ( "654... | org . junit . Assert . assertEquals ( "654123" , retorno . getInscricaoEstadualAtual ( ) ) |
testFindBinary ( ) { ca . uhn . fhir . context . copy . RuntimeResourceDefinition def = ca . uhn . fhir . context . copy . FhirContext . forDstu1 ( ) . getResourceDefinition ( "Binary" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return myName ; } | org . junit . Assert . assertEquals ( "Binary" , def . getName ( ) ) |
shouldAcceptValidLBForReassignHost ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = lbvalidator . validate ( loadBalancer , ReassignHostContext . REASSIGN_HOST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( result . passedValidation ( ) ) |
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . message_processing_interfaces . irouter . exceptions . RouteNotFoundException exception = new info . smart_tools . smartactors . message_processing_interfaces . irouter . exceptions . RouteNotFoundException ( str ) ; "<Asser... | org . junit . Assert . assertEquals ( exception . getMessage ( ) , str ) |
lookUpEndpointsWithLookupRequestType ( ) { names . clear ( ) ; names . add ( org . talend . esb . locator . service . LocatorSoapServiceTest . ENDPOINTURL ) ; expect ( sl . lookup ( org . talend . esb . locator . service . LocatorSoapServiceTest . SERVICE_NAME ) ) . andStubReturn ( names ) ; expect ( sl . getEndpoint (... | org . junit . Assert . assertTrue ( endpointRef . toString ( ) . equals ( expectedRef . toString ( ) ) ) |
compareSucceeds4 ( ) { final org . exist . xquery . value . DurationValue dv1 = new org . exist . xquery . value . YearMonthDurationValue ( "P1Y" ) ; final org . exist . xquery . value . DurationValue dv2 = new org . exist . xquery . value . DayTimeDurationValue ( "P1D" ) ; "<AssertPlaceHolder>" ; } compareTo ( com . i... | org . junit . Assert . assertFalse ( dv1 . compareTo ( null , Comparison . EQ , dv2 ) ) |
byPath ( ) { java . util . Optional < org . jooby . MediaType > type = org . jooby . MediaType . byPath ( java . nio . file . Paths . get ( "file.json" ) ) ; "<AssertPlaceHolder>" ; } get ( ) { request ( ) . get ( "/members" ) . expect ( ( "[<sp>{\n" + ( ( "<sp>\"id\"<sp>:<sp>1,\n" + "<sp>\"name\"<sp>:<sp>\"pablo\"\n" ... | org . junit . Assert . assertEquals ( MediaType . json , type . get ( ) ) |
testDefineCommand8 ( ) { com . gabstudios . cmdline . CmdLine . defineCommand ( "file,<sp>!file1,<sp>!file2" ) ; final java . lang . String [ ] args = new java . lang . String [ 3 ] ; args [ 0 ] = "file" ; args [ 1 ] = "=" ; args [ 2 ] = "file1.txt" ; try { com . gabstudios . cmdline . CmdLine . parse ( args ) ; org . ... | org . junit . Assert . assertTrue ( true ) |
renameShouldBeDisabledIfResourceIsFolderAndHasSourceParentFolder ( ) { when ( resource . getParentWithMarker ( SourceFolderMarker . ID ) ) . thenReturn ( com . google . common . base . Optional . of ( resource ) ) ; when ( resource . isFolder ( ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } isRenameAllowed ( org... | org . junit . Assert . assertFalse ( validator . isRenameAllowed ( resource ) ) |
testBuildAllEvents ( ) { java . io . File file = builder . addLocLocation ( ) . buildAllEvents ( ) . writeToXmlFile ( ) ; "<AssertPlaceHolder>" ; } writeToXmlFile ( ) { org . v8LogScanner . logsCfg . File logFile = null ; for ( java . nio . file . Path path : cfgPaths ) { logFile = new org . v8LogScanner . logsCfg . Fi... | org . junit . Assert . assertTrue ( file . exists ( ) ) |
testMethodCallWithNullParameters_shouldBeSerialized ( ) { java . lang . Object [ ] args = new java . lang . Object [ ] { 1 , null , 2 } ; java . lang . String [ ] classes = new java . lang . String [ ] { "java.lang.Integer" , "java.lang.Integer" , "java.lang.Integer" } ; org . openengsb . core . api . remote . MethodCa... | org . junit . Assert . assertThat ( readValue , org . hamcrest . CoreMatchers . is ( methodCall ) ) |
testSerializationTimestampParameters ( ) { eu . europa . esig . dss . TimestampParameters timestampParams = new eu . europa . esig . dss . TimestampParameters ( ) ; byte [ ] serialized = eu . europa . esig . dss . SerializationTest . serialize ( timestampParams ) ; eu . europa . esig . dss . TimestampParameters unseria... | org . junit . Assert . assertEquals ( timestampParams , unserialized ) |
testHandleSummaryRequest ( ) { java . util . List < accounts . Account > accounts = controller . accountSummary ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , accounts . size ( ) ) |
checkGetName ( ) { info . smart_tools . smartactors . message_processing_interfaces . message_processing . IReceiverChain chain = new info . smart_tools . smartactors . testing . test_environment_handler . ExceptionalTestChain ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertNotNull ( chain . getName ( ) ) |
testLookupByNameAndWrongType ( ) { java . lang . Object answer = registry . lookupByNameAndType ( "a" , org . apache . camel . impl . Float . class ) ; "<AssertPlaceHolder>" ; } lookupByNameAndType ( java . lang . String , java . lang . Class ) { java . lang . Object answer ; try { answer = applicationContext . getBean... | org . junit . Assert . assertNull ( answer ) |
testCloseCarryingSnapshot ( ) { region = initHRegion ( tableName , method , org . apache . hadoop . hbase . regionserver . TestHRegion . CONF , org . apache . hadoop . hbase . regionserver . TestHRegion . COLUMN_FAMILY_BYTES ) ; org . apache . hadoop . hbase . regionserver . HStore store = region . getStore ( org . apa... | org . junit . Assert . assertEquals ( 0 , region . getMemStoreDataSize ( ) ) |
testAddChildBefore_withNullExistingChild ( ) { final com . valkryst . VTerminal . TileGrid gridA = new com . valkryst . VTerminal . TileGrid ( new java . awt . Dimension ( 1 , 1 ) ) ; parentGrid . addChildBefore ( gridA , null ) ; "<AssertPlaceHolder>" ; } containsChild ( com . valkryst . VTerminal . TileGrid ) { if ( ... | org . junit . Assert . assertTrue ( parentGrid . containsChild ( gridA ) ) |
testInit ( ) { final org . drools . workbench . screens . guided . dtable . client . wizard . column . NewGuidedDecisionTableColumnWizard wizard = mock ( org . drools . workbench . screens . guided . dtable . client . wizard . column . NewGuidedDecisionTableColumnWizard . class ) ; plugin . init ( wizard ) ; "<AssertPl... | org . junit . Assert . assertNotNull ( plugin . editingCol ( ) ) |
renameToExisting ( ) { "<AssertPlaceHolder>" ; thrown . expect ( org . eclipse . jgit . api . errors . RefAlreadyExistsException . class ) ; git . branchRename ( ) . setOldName ( "master" ) . setNewName ( "foo" ) . call ( ) ; } branchCreate ( ) { return new org . eclipse . jgit . api . CreateBranchCommand ( repo ) ; } | org . junit . Assert . assertNotNull ( git . branchCreate ( ) . setName ( "foo" ) . call ( ) ) |
testGetStringTypeStrings ( ) { secureNodeBuilder . setProperty ( "strings" , com . google . common . collect . ImmutableList . of ( "a" , "b" ) , Type . STRINGS ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return delegate . getString ( name ) ; } | org . junit . Assert . assertNull ( secureNodeBuilder . getString ( "strings" ) ) |
testMarkProcessed ( ) { when ( cache . getDocumentById ( id1 ) ) . thenReturn ( doc1 ) ; when ( writer . markProcessed ( doc1 , "tag" ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( cache , times ( 1 ) ) . remove ( id1 ) ; verify ( writer , times ( 1 ) ) . markProcessed ( doc1 , "tag" ) ; verify ( doc1 , t... | org . junit . Assert . assertTrue ( io . markProcessed ( doc1 , "tag" ) ) |
whenDeletingStudent_thenNotAvailableOnRetrieval ( ) { final com . baeldung . spring . data . redis . model . Student student = new com . baeldung . spring . data . redis . model . Student ( "Eng2015001" , "John<sp>Doe" , Student . Gender . MALE , 1 ) ; studentRepository . save ( student ) ; studentRepository . deleteBy... | org . junit . Assert . assertNull ( retrievedStudent ) |
testOneSuccessfulSelect ( ) { final com . google . common . util . concurrent . SettableFuture < java . lang . String > f1 = com . google . common . util . concurrent . SettableFuture . create ( ) ; final com . google . common . util . concurrent . SettableFuture < java . lang . String > f2 = com . google . common . ut... | org . junit . Assert . assertTrue ( zealous . get ( ) . equals ( "value" ) ) |
object ( ) { "<AssertPlaceHolder>" ; } object ( ) { org . junit . Assert . assertEquals ( new com . eclipsesource . json . JsonObject ( ) , com . eclipsesource . json . Json . object ( ) ) ; } | org . junit . Assert . assertEquals ( new com . eclipsesource . json . JsonObject ( ) , com . eclipsesource . json . Json . object ( ) ) |
testSerializable ( ) { java . awt . Color c = new java . awt . Color ( 128 , 128 , 128 ) ; new hgtest . types . BasicOperations ( graph ) . executeAndVerify ( new hgtest . AtomOperation [ ] { new hgtest . AtomOperation ( hgtest . AtomOperationKind . add , c ) } , false , false , true ) ; org . hypergraphdb . HGHandle c... | org . junit . Assert . assertEquals ( c , new java . awt . Color ( 128 , 128 , 128 ) ) |
testDelegatesDelete ( ) { javax . servlet . http . HttpServletRequest req = mockHttpRequest ( ) ; javax . servlet . http . HttpServletResponse resp = mock ( javax . servlet . http . HttpServletResponse . class ) ; callbackSerlvet . doDelete ( req , resp ) ; verify ( resource ) . delete ( any ( com . eclipsesource . res... | org . junit . Assert . assertTrue ( callbackSerlvet . wasCalled ( ) ) |
testGetPropertyType ( ) { java . util . HashSet < sernet . hui . common . connect . EntityType > allTypes = new java . util . HashSet ( huiTypeFactory . getAllEntityTypes ( ) ) ; java . util . HashSet < sernet . hui . common . connect . EntityType > typesSubSet = getRandomSubset ( allTypes , getRandomInteger ( 1 , sern... | org . junit . Assert . assertEquals ( propertyType , huiTypeFactory . getPropertyType ( type . getId ( ) , propertyType . getId ( ) ) ) |
testNegativeImaginary ( ) { org . apache . commons . math3 . complex . Complex c = new org . apache . commons . math3 . complex . Complex ( 1.2323 , ( - 1.4343 ) ) ; java . lang . String expected = ( ( ( "1" + ( getDecimalCharacter ( ) ) ) + "23<sp>-<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "43i" ; java . lang . Strin... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetUserPreferredIIOImplementation ( ) { edu . illinois . library . cantaloupe . config . Configuration config = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) ; config . setProperty ( PNGImageReader . IMAGEIO_PLUGIN_CONFIG_KEY , "cats" ) ; "<AssertPlaceHolder>" ; } getUserPreferred... | org . junit . Assert . assertEquals ( "cats" , ( ( edu . illinois . library . cantaloupe . processor . codec . PNGImageReader ) ( instance ) ) . getUserPreferredIIOImplementation ( ) ) |
testGetDataByColumnName ( ) { java . util . List < java . lang . String > originalData = new java . util . ArrayList < java . lang . String > ( ) ; originalData . add ( "3.5" ) ; originalData . add ( "8" ) ; originalData . add ( "13" ) ; org . pentaho . metadata . query . model . util . CsvDataReader reader = new org .... | org . junit . Assert . assertTrue ( compare ( data , originalData ) ) |
canGetOriginalResource ( ) { entry = new org . apache . hc . client5 . http . cache . HttpCacheEntry ( new java . util . Date ( ) , new java . util . Date ( ) , org . apache . hc . core5 . http . HttpStatus . SC_OK , new org . apache . hc . core5 . http . Header [ ] { } , mockResource ) ; "<AssertPlaceHolder>" ; } getR... | org . junit . Assert . assertSame ( mockResource , entry . getResource ( ) ) |
testGetInstanceByteBufferUTC ( ) { org . joda . time . DateTimeZone instance = org . apache . phoenix . cache . JodaTimezoneCache . getInstance ( java . nio . ByteBuffer . wrap ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "UTC" ) ) ) ; "<AssertPlaceHolder>" ; } toBytes ( java . lang . String ) { if ( inpu... | org . junit . Assert . assertNotNull ( instance ) |
testPut ( ) { long cacheSize = 100 ; com . navercorp . pinpoint . profiler . metadata . LRUCache cache = new com . navercorp . pinpoint . profiler . metadata . LRUCache ( ( ( int ) ( cacheSize ) ) ) ; java . util . Random random = new java . util . Random ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { cache . put ( java .... | org . junit . Assert . assertEquals ( size , cacheSize ) |
testGetOutUserCountAsInt ( ) { System . out . println ( "getOutUserCountAsInt" ) ; kg . apc . jmeter . threads . SteppingThreadGroup instance = new kg . apc . jmeter . threads . SteppingThreadGroup ( ) ; int expResult = 0 ; int result = instance . getOutUserCountAsInt ( ) ; "<AssertPlaceHolder>" ; } getOutUserCountAsIn... | org . junit . Assert . assertEquals ( expResult , result ) |
toListReturnsAListWhenGivenAnotherTypeOfCollection ( ) { java . util . List < java . lang . Object > list = runtime ( ) . toList ( java . util . Collections . singleton ( parse ( "1" ) ) ) ; "<AssertPlaceHolder>" ; } toList ( com . google . gson . JsonElement ) { java . util . List < com . google . gson . JsonElement >... | org . junit . Assert . assertThat ( list , org . hamcrest . Matchers . is ( java . util . Arrays . asList ( parse ( "1" ) ) ) ) |
lax ( ) { net . time4j . format . expert . ChronoFormatter < net . time4j . PlainDate > fmt = this . formatter . with ( Attributes . LENIENCY , Leniency . LAX ) ; net . time4j . PlainDate date = fmt . parse ( this . text ) ; net . time4j . PlainDate expected = net . time4j . PlainDate . of ( 2013 , 9 , 1 ) ; "<AssertPl... | org . junit . Assert . assertThat ( date , org . hamcrest . CoreMatchers . is ( expected ) ) |
testBitmapIsReused ( ) { android . graphics . Bitmap expected = android . graphics . Bitmap . createBitmap ( 128 , 128 , Bitmap . Config . RGB_565 ) ; mPool . release ( expected ) ; android . graphics . Bitmap actual = mPool . get ( ( ( 128 * 128 ) * 2 ) ) ; "<AssertPlaceHolder>" ; } get ( K ) { return mMap . get ( key... | org . junit . Assert . assertSame ( actual , expected ) |
excludeParams ( ) { com . clouway . friendlyserve . Request request = aNewRequest ( ) . param ( "::i::" , "::1::" ) . param ( "::codeparam::" , "::1::" ) . param ( "::otherparam::" , "::1::" ) . build ( ) ; java . util . Map < java . lang . String , java . lang . String > params = new com . clouway . oauth2 . util . Pa... | org . junit . Assert . assertThat ( params , org . hamcrest . CoreMatchers . < java . util . Map < java . lang . String , java . lang . String > > is ( of ( "::i::" , "::1::" ) ) ) |
testAsSet ( ) { java . lang . String [ ] s = null ; try { asSet ( s ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { } s = new java . lang . String [ ] { "a" } ; org . apache . juneau . utils . Iterator < java . lang . String > i = asSet ( s ) . iterator ( ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( "a" , i . next ( ) ) |
testDownloadCql ( ) { java . util . List < de . bayern . gdi . model . DownloadStep > steps = prepareStep ( de . bayern . gdi . IntegrationTest . DOWNLOAD_CONFIGURATION :: getCqlConfig ) ; java . lang . String username = "" ; java . lang . String password = "" ; int result = de . bayern . gdi . Headless . runHeadless (... | org . junit . Assert . assertTrue ( ( result == 0 ) ) |
getOrder ( ) { "<AssertPlaceHolder>" ; } getOrder ( ) { org . junit . Assert . assertEquals ( Integer . MAX_VALUE , org . apache . servicecomb . swagger . invocation . response . consumer . TestDefaultConsumerResponseMapperFactory . factory . getOrder ( ) ) ; } | org . junit . Assert . assertEquals ( Integer . MAX_VALUE , org . apache . servicecomb . swagger . invocation . response . consumer . TestDefaultConsumerResponseMapperFactory . factory . getOrder ( ) ) |
testEquals3 ( ) { org . jfree . data . time . TimeSeries s1 = new org . jfree . data . time . TimeSeries ( "Series" , org . jfree . data . time . Day . class ) ; org . jfree . data . time . TimeSeries s2 = new org . jfree . data . time . TimeSeries ( "Series" , org . jfree . data . time . Month . class ) ; "<AssertPlac... | org . junit . Assert . assertFalse ( s1 . equals ( s2 ) ) |
testExceptionDuringClose ( ) { @ org . eclipse . jgit . util . io . SuppressWarnings ( "resource" ) final org . eclipse . jgit . util . io . UnionInputStream u = new org . eclipse . jgit . util . io . UnionInputStream ( ) ; u . add ( new java . io . ByteArrayInputStream ( new byte [ ] { 1 } ) { @ org . eclipse . jgit .... | org . junit . Assert . assertEquals ( "I<sp>AM<sp>A<sp>TEST" , e . getMessage ( ) ) |
shouldComputeIndexUpdatesOnEmptyTxState ( ) { addNodesToIndex ( indexOn_2_1 ) . withDefaultStringProperties ( 42L ) ; org . eclipse . collections . impl . UnmodifiableMap < org . neo4j . values . storable . ValueTuple , ? extends org . neo4j . storageengine . api . txstate . LongDiffSets > diffSets = state . getIndexUp... | org . junit . Assert . assertNull ( diffSets ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.