input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testPlayerMoveInsideLockedIslandWithBypass ( ) { org . bukkit . entity . Player player = mock ( org . bukkit . entity . Player . class ) ; when ( player . getUniqueId ( ) ) . thenReturn ( uuid ) ; when ( player . isOp ( ) ) . thenReturn ( false ) ; when ( player . hasPermission ( org . mockito . Mockito . anyString ( )... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
getProviderRole_shouldReturnNullIfBogusId ( ) { java . lang . Object providerRole = org . openmrs . module . htmlformentry . HtmlFormEntryUtil . getProviderRole ( "some<sp>bogus<sp>text" ) ; "<AssertPlaceHolder>" ; } getProviderRole ( java . lang . String ) { java . lang . Object providerRole = null ; if ( org . apache... | org . junit . Assert . assertNull ( providerRole ) |
getNoOperationMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveNoOperationCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveNoOperationCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_NO_OPERATION ) ) ) ; org . open... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponse1 ) ) |
testSerialization ( ) { org . jfree . data . xy . DefaultHighLowDataset d1 = new org . jfree . data . xy . DefaultHighLowDataset ( "Series<sp>1" , new java . util . Date [ ] { new java . util . Date ( 123L ) } , new double [ ] { 1.2 } , new double [ ] { 3.4 } , new double [ ] { 5.6 } , new double [ ] { 7.8 } , new doub... | org . junit . Assert . assertEquals ( d1 , d2 ) |
testEqualsWithDiferentId ( ) { System . out . println ( "testEqualsWithDiferentId" ) ; team . bus . model . bean . BusStop o1 = new team . bus . model . bean . BusStop ( ) . withId ( 1 ) . withName ( "a" ) ; team . bus . model . bean . BusStop o2 = new team . bus . model . bean . BusStop ( ) . withId ( 2 ) . withName (... | org . junit . Assert . assertTrue ( ( ! result ) ) |
testWriteLockThrowsExceptionAfterMaxStoreTimeouts ( ) { expect ( lockState . has ( defaultTx , defaultLockID ) ) . andReturn ( false ) ; recordSuccessfulLocalLock ( ) ; com . thinkaurelius . titan . diskstorage . locking . StaticBuffer firstCol = recordSuccessfulLockWrite ( 5 , ChronoUnit . SECONDS , null ) . col ; com... | org . junit . Assert . assertNotNull ( expected ) |
testStaxHandler ( ) { org . apache . camel . CamelContext camelctx = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . stax . Override public void configure ( ) throws org . wildfly . camel . test .... | org . junit . Assert . assertEquals ( 6 , handler . getCount ( ) ) |
testFindServerProfileSchemaByKeyHash ( ) { org . kaaproject . kaa . common . dto . ServerProfileSchemaDto schemaDto = generateServerProfileSchema ( null , null ) ; org . kaaproject . kaa . common . dto . EndpointProfileDto ep = generateEndpointProfileDtoWithSchemaVersion ( schemaDto . getApplicationId ( ) , schemaDto .... | org . junit . Assert . assertEquals ( schemaDto , foundSchema ) |
getContentTypeShouldGetContentTypeFromParam ( ) { java . util . Map < java . lang . String , java . lang . Object > metaDatas = java . util . Collections . singletonMap ( "multipart.content-type" , ( ( java . lang . Object ) ( "expected" ) ) ) ; org . codegist . crest . param . Param param = mock ( org . codegist . cre... | org . junit . Assert . assertEquals ( "expected" , org . codegist . crest . util . MultiParts . getContentType ( param ) ) |
testSequenceZero ( ) { final int [ ] seq = org . apache . commons . math4 . util . MathArrays . sequence ( 0 , 12345 , 6789 ) ; "<AssertPlaceHolder>" ; } sequence ( double , double , double ) { final int size = ( ( int ) ( ( ( end - start ) / step ) + 1 ) ) ; final double [ ] [ ] d = new double [ size ] [ 1 ] ; double ... | org . junit . Assert . assertEquals ( 0 , seq . length ) |
testSSLOptionYamlOptionWithProperyFalse ( ) { java . lang . System . setProperty ( "ssl.authPeer" , "false" ) ; com . netflix . config . ConcurrentCompositeConfiguration finalConfig = org . apache . servicecomb . config . ConfigUtil . createLocalConfig ( ) ; org . apache . servicecomb . foundation . ssl . SSLOption opt... | org . junit . Assert . assertEquals ( false , authPeer ) |
testDeleteSiteNavigationMenuItemBySiteNavigationMenuItemId ( ) { com . liferay . site . navigation . model . SiteNavigationMenuItem siteNavigationMenuItem = com . liferay . site . navigation . util . SiteNavigationMenuTestUtil . addSiteNavigationMenuItem ( _siteNavigationMenu ) ; com . liferay . site . navigation . ser... | org . junit . Assert . assertNull ( com . liferay . site . navigation . service . SiteNavigationMenuItemLocalServiceUtil . fetchSiteNavigationMenuItem ( siteNavigationMenuItem . getSiteNavigationMenuItemId ( ) ) ) |
testCreateExportManifestDtoExportManifestInformation ( ) { "<AssertPlaceHolder>" ; } createExportManifestDtoExportManifestInformation ( ) { return new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . ExportManifestDto . ExportManifestInformation ( ) ; } | org . junit . Assert . assertNotNull ( factory . createExportManifestDtoExportManifestInformation ( ) ) |
testExpandParseDictionaryTypeNamePrimitive ( ) { java . lang . String result = org . adoptopenjdk . jitwatch . util . ParseUtil . expandParseDictionaryTypeName ( "int" ) ; "<AssertPlaceHolder>" ; } expandParseDictionaryTypeName ( java . lang . String ) { java . lang . String result = null ; if ( typeName != null ) { re... | org . junit . Assert . assertEquals ( "int" , result ) |
testBuilderWithId ( ) { com . intuit . wasabi . experimentobjects . PrioritizedExperiment prioExp = com . intuit . wasabi . experimentobjects . PrioritizedExperiment . from ( exp , 0 ) . build ( ) ; "<AssertPlaceHolder>" ; } getID ( ) { return id ; } | org . junit . Assert . assertEquals ( prioExp . getID ( ) , exp . getID ( ) ) |
textClear ( ) { textView . addTrait ( new jetbrains . jetpad . cell . trait . CellTrait ( ) { @ jetbrains . jetpad . cell . text . Override public java . lang . Object get ( jetbrains . jetpad . cell . text . Cell cell , jetbrains . jetpad . cell . trait . CellTraitPropertySpec < ? > spec ) { if ( spec == ( TextEditing... | org . junit . Assert . assertEquals ( "" , textView . text ( ) . get ( ) ) |
testAddAttribute ( ) { org . ebayopensource . turmeric . tools . annoparser . dataobjects . ParsedAnnotationTag parsedAnnotationTag = new org . ebayopensource . turmeric . tools . annoparser . dataobjects . ParsedAnnotationTag ( ) ; parsedAnnotationTag . addAttribute ( "attributeName" , "attributeValue" ) ; if ( parsed... | org . junit . Assert . assertTrue ( true ) |
testCouplingConsistencyErrorFALSE_NO_CONSISTENCY ( ) { org . deegree . metadata . iso . persistence . inspectors . InspectorCouplingTest . LOG . info ( "START<sp>Test:<sp>test<sp>if<sp>the<sp>the<sp>coupled<sp>service<sp>metadata<sp>will<sp>be<sp>inserted<sp>without<sp>any<sp>coupling<sp>but<sp>no<sp>exception<sp>will<... | org . junit . Assert . assertEquals ( 2 , size ) |
testPasswordRequired ( ) { svanimpe . reminders . domain . User user = new svanimpe . reminders . domain . User ( ) ; user . setUsername ( "someuser" ) ; java . util . Set < javax . validation . ConstraintViolation < svanimpe . reminders . domain . User > > violations = validator . validate ( user ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testNoInputFile ( ) { ru . r2cloud . SpectogramService service = new ru . r2cloud . SpectogramService ( config ) ; "<AssertPlaceHolder>" ; } create ( ru . r2cloud . model . ObservationFull ) { ru . r2cloud . SpectogramService . LOG . info ( "generating<sp>spectogram" ) ; if ( ( observation == null ) || ( ( observation ... | org . junit . Assert . assertNull ( service . create ( null ) ) |
testScanWithEmptyBundle ( ) { com . codeaffine . osgi . testuite . internal . ClassPathScanner scanner = new com . codeaffine . osgi . testuite . internal . ClassPathScanner ( bundle , devProperties , classnameFilter ) ; java . lang . Class < ? > [ ] classes = scanner . scan ( ) ; "<AssertPlaceHolder>" ; } scan ( ) { j... | org . junit . Assert . assertEquals ( 0 , classes . length ) |
testNewPacket ( ) { try { org . pcap4j . packet . IcmpV6RouterAdvertisementPacket p = org . pcap4j . packet . IcmpV6RouterAdvertisementPacket . newPacket ( packet . getRawData ( ) , 0 , packet . getRawData ( ) . length ) ; "<AssertPlaceHolder>" ; } catch ( org . pcap4j . packet . IllegalRawDataException e ) { throw new... | org . junit . Assert . assertEquals ( packet , p ) |
should_raise_exception_when_delete_readonly_env ( ) { "<AssertPlaceHolder>" ; com . flow . platform . api . domain . node . Node mock = new com . flow . platform . api . domain . node . Node ( "flow" , "flow" ) ; envService . delete ( mock , com . google . common . collect . Sets . newHashSet ( FlowEnvs . FLOW_STATUS .... | org . junit . Assert . assertTrue ( FlowEnvs . FLOW_STATUS . isReadonly ( ) ) |
testInitializerMethodCalled ( ) { "<AssertPlaceHolder>" ; } isInitializerCalled ( ) { return org . jboss . as . test . integration . jsf . managedbean . annotation . SimpleJsfManagedBean . initializerCalled ; } | org . junit . Assert . assertTrue ( org . jboss . as . test . integration . jsf . managedbean . annotation . SimpleJsfManagedBean . isInitializerCalled ( ) ) |
testNegativeZ ( ) { org . apache . commons . math3 . geometry . euclidean . threed . Vector3D c = new org . apache . commons . math3 . geometry . euclidean . threed . Vector3D ( 1.23 , 1.43 , ( - 1.633333333333 ) ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>1" ) + ( getDe... | org . junit . Assert . assertEquals ( expected , actual ) |
testInterface ( ) { org . skife . config . TestDefaultNull . EmptyInterface ec = cof . build ( org . skife . config . TestDefaultNull . EmptyInterface . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNull ( ec . getValue ( ) ) |
getErrorReasonReturnsErrorReason ( ) { final int status = 200 ; final byte [ ] body = new byte [ ] { 1 } ; final java . util . Map < java . lang . String , java . util . List < java . lang . String > > headerFields = new java . util . HashMap ( ) ; final byte [ ] errorReason = new byte [ ] { 2 , 3 , 4 , 5 } ; final byt... | org . junit . Assert . assertThat ( testErrorReason , org . hamcrest . CoreMatchers . is ( expectedErrorReason ) ) |
testPathEncodedSlashNot ( ) { java . lang . String path1 = "ab" ; java . lang . String path2 = "{xy}" ; java . lang . String expected = "ab/x/y" ; java . net . URI uri = javax . ws . rs . core . UriBuilder . fromPath ( path1 ) . path ( path2 ) . build ( new java . lang . Object [ ] { "x/y" } , false ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( uri . toString ( ) , expected ) |
testToCollectionWithCollection ( ) { java . util . List < java . lang . String > expectedList = java . util . Arrays . asList ( "x" , "y" , "z" ) ; java . util . Collection < ? > actualList = repositoryQuery . toCollection ( expectedList ) ; "<AssertPlaceHolder>" ; } toCollection ( java . lang . Object ) { if ( source ... | org . junit . Assert . assertSame ( expectedList , actualList ) |
testToDefaultString_NoneShadow ( ) { org . eclipse . rap . rwt . internal . theme . CssShadow shadow = CssShadow . NONE ; java . lang . String expected = "none" ; "<AssertPlaceHolder>" ; } toDefaultString ( ) { return isCustomCursor ( ) ? "" : value ; } | org . junit . Assert . assertEquals ( expected , shadow . toDefaultString ( ) ) |
testTagParsing_2 ( ) { "<AssertPlaceHolder>" ; } parseTags ( java . lang . String ) { java . lang . String s = text . trim ( ) ; if ( s . isEmpty ( ) ) { return new java . lang . String [ 0 ] ; } else { java . lang . String [ ] split = s . split ( org . springframework . ide . eclipse . boot . dash . model . TagUtils .... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ 0 ] , org . springframework . ide . eclipse . boot . dash . model . TagUtils . parseTags ( "" ) ) |
isInTier ( ) { mInfo . addWorker ( 1 , "HDD" ) ; "<AssertPlaceHolder>" ; } isInTier ( java . lang . String ) { return mTierAliases . contains ( tierAlias ) ; } | org . junit . Assert . assertTrue ( mInfo . isInTier ( "HDD" ) ) |
givenTwoDateTimesInJava8_whenDifferentiating_thenWeGetSix ( ) { java . time . LocalDateTime now = java . time . LocalDateTime . now ( ) ; java . time . LocalDateTime sixMinutesBehind = now . minusMinutes ( 6 ) ; java . time . Duration duration = java . time . Duration . between ( now , sixMinutesBehind ) ; long diff = ... | org . junit . Assert . assertEquals ( diff , 6 ) |
testUsingTempFolderStringReflection ( ) { java . lang . String subfolder = "subfolder" ; java . lang . String filename = "a.txt" ; java . lang . reflect . Method method = folder . getClass ( ) . getMethod ( "newFolder" , new java . lang . Class < ? > [ ] { java . lang . String . class } ) ; org . junit . tests . experi... | org . junit . Assert . assertTrue ( expectedFile . exists ( ) ) |
emptyBuild ( ) { gov . hhs . fha . nhinc . event . EventDescription eventDescription = getEventDescription ( builder ) ; "<AssertPlaceHolder>" ; } getEventDescription ( gov . hhs . fha . nhinc . event . EventDescriptionBuilder ) { setMsgMocks ( builder ) ; return runDirector ( builder ) ; } | org . junit . Assert . assertNotNull ( eventDescription ) |
control1 ( ) { final java . io . File file = org . jboss . shrinkwrap . resolver . api . maven . Maven . configureResolver ( ) . withClassPathResolution ( false ) . resolve ( "junit:junit:4.11" ) . withoutTransitivity ( ) . asSingle ( java . io . File . class ) ; new org . jboss . shrinkwrap . resolver . impl . maven .... | org . junit . Assert . assertTrue ( file . getAbsolutePath ( ) . contains ( localRepo . getAbsolutePath ( ) ) ) |
testMillisSerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . LocalTime . class , TimestampFormat . MILLIS ) ; java . time . LocalTime dt = java . time . LocalDateTime . ofInstant ( java . time . Instant . ofEpochMilli ( 4534654564653L ) , defaultZoneId ) . toLocalTime ( ) ... | org . junit . Assert . assertEquals ( millis . toString ( ) , genson . serialize ( dt ) ) |
datasetShouldNotBeDeaccessionedWithOneReleasedVersion ( ) { java . util . List < edu . harvard . iq . dataverse . DatasetVersion > versionList = new java . util . ArrayList < edu . harvard . iq . dataverse . DatasetVersion > ( ) ; versionList . add ( this . releasedVersion ) ; edu . harvard . iq . dataverse . Dataset d... | org . junit . Assert . assertFalse ( dataset . isDeaccessioned ( ) ) |
testQueryOnlyProxiesDenied ( ) { org . nuxeo . ecm . core . storage . sql . Session session = repository . getConnection ( ) ; java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>Document<sp>WHERE<sp>ecm:isProxy<sp>=<sp>1" ; try ( org . nuxeo . ecm . core . api . IterableQueryResult res = session . queryAndFetch ( sql ,... | org . junit . Assert . assertEquals ( 0 , res . size ( ) ) |
testKeyBuildingWithMultipleTimestamps ( ) { org . apache . accumulo . core . data . Key keyBuilt = org . apache . accumulo . core . data . Key . builder ( ) . row ( "r" ) . timestamp ( 44 ) . timestamp ( 99 ) . build ( ) ; org . apache . accumulo . core . data . Key keyExpected = new org . apache . accumulo . core . da... | org . junit . Assert . assertEquals ( keyExpected , keyBuilt ) |
considersOneToOneMappedPropertyAnAssociation ( ) { org . springframework . data . jpa . mapping . JpaPersistentProperty property = entity . getRequiredPersistentProperty ( "other" ) ; "<AssertPlaceHolder>" ; } isAssociation ( ) { return isAssociation . get ( ) ; } | org . junit . Assert . assertThat ( property . isAssociation ( ) , is ( true ) ) |
shouldAddHstsHeaderWhenConfigured ( ) { java . lang . String configuredValue = "max-age=3600;<sp>includeSubDomains" ; org . neo4j . server . security . ssl . Customizer customizer = org . neo4j . server . security . ssl . HttpsRequestCustomizerTest . newCustomizer ( configuredValue ) ; org . eclipse . jetty . server . ... | org . junit . Assert . assertEquals ( configuredValue , receivedValue ) |
containsRowWithKeys_simpleQueryWithExistingKeys_returnsTrue ( ) { com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery query = new com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery ( "SELECT<sp>*<sp>FROM<sp>people" , java . util . Arrays . asList ( "ID" ) , connectionPool ) ; "<As... | org . junit . Assert . assertTrue ( query . containsRowWithKey ( 1 ) ) |
delete_file_java_legacy ( ) { java . io . File fileToDelete = new java . io . File ( com . levelup . java . io . DeleteFile . DEST ) ; boolean hasBeenDeleted = fileToDelete . delete ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( hasBeenDeleted ) |
testGet ( ) { "<AssertPlaceHolder>" ; } get ( ) { if ( null == ( ch . cyberduck . core . PasswordStoreFactory . store ) ) { ch . cyberduck . core . PasswordStoreFactory . store = new ch . cyberduck . core . PasswordStoreFactory ( ) . create ( ) ; } return ch . cyberduck . core . PasswordStoreFactory . store ; } | org . junit . Assert . assertSame ( ch . cyberduck . core . PasswordStoreFactory . get ( ) , ch . cyberduck . core . PasswordStoreFactory . get ( ) ) |
readsUncompressedBlocks ( ) { byte [ ] input = new byte [ ] { 4 , 34 , 77 , 24 , 96 , 112 , 115 , 13 , 0 , 0 , ( ( byte ) ( 128 ) ) , 'H' , 'e' , 'l' , 'l' , 'o' , ',' , '<sp>' , 'w' , 'o' , 'r' , 'l' , 'd' , '!' , 0 , 0 , 0 , 0 } ; try ( java . io . InputStream a = new org . apache . commons . compress . compressors .... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 'H' , 'e' , 'l' , 'l' , 'o' , ',' , '<sp>' , 'w' , 'o' , 'r' , 'l' , 'd' , '!' } , actual ) |
testOnDefaultKnowledgeSessionChanged ( ) { final org . kie . workbench . common . services . shared . kmodule . KBaseModel kBaseModel = new org . kie . workbench . common . services . shared . kmodule . KBaseModel ( ) ; kBaseModel . setDefault ( true ) ; knowledgeBaseItemPresenter . kBaseModel = kBaseModel ; knowledgeB... | org . junit . Assert . assertTrue ( kBaseModel . isDefault ( ) ) |
testInitAspect2 ( ) { org . dresdenocl . examples . royalandloyal . ocl22javacode . CustomerCard aCard ; aCard = new org . dresdenocl . examples . royalandloyal . ocl22javacode . CustomerCard ( ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return valid ; } | org . junit . Assert . assertTrue ( aCard . isValid ( ) ) |
testEqualsWithNull ( ) { java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; attributes . put ( "att123" , "val123" ) ; org . o3project . odenos . core . component . network . topology . Link link = new org . o3pr... | org . junit . Assert . assertFalse ( link . equals ( null ) ) |
testNoUnderscore ( ) { metricName = "echometricone" ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { if ( ( null == nameForCrossEntityAggregate ) || ( nameForCrossEntityAggregate . isEmpty ( ) ) ) { return true ; } return com . cloudera . csd . validation ... | org . junit . Assert . assertTrue ( validator . isValid ( metricName , context ) ) |
testAndWithMultipleEntryDuplicated ( ) { final com . allanbank . mongodb . bson . Document doc = com . allanbank . mongodb . builder . QueryBuilder . and ( com . allanbank . mongodb . builder . QueryBuilder . where ( "x" ) . equals ( 23 ) , com . allanbank . mongodb . builder . QueryBuilder . where ( "y" ) . equals ( 2... | org . junit . Assert . assertEquals ( expected . build ( ) , doc ) |
testValidationForDatetimeDefaultValue ( ) { java . util . List < com . streamsets . pipeline . lib . jdbc . JdbcFieldColumnMapping > columnMappings = com . google . common . collect . ImmutableList . of ( new com . streamsets . pipeline . lib . jdbc . JdbcFieldColumnMapping ( "P_ID" , "[2]" , "1-1-1999" , com . streams... | org . junit . Assert . assertEquals ( 1 , issues . size ( ) ) |
testSetsAppId ( ) { com . eclipsesource . tabris . internal . AppImpl app = new com . eclipsesource . tabris . internal . AppImpl ( ) ; org . eclipse . rap . json . JsonObject properties = new org . eclipse . rap . json . JsonObject ( ) ; properties . set ( "id" , "foo.bar" ) ; app . handleSet ( properties ) ; java . l... | org . junit . Assert . assertEquals ( "foo.bar" , id ) |
testRender ( ) { final com . ait . lienzo . client . core . shape . Group glyphView = tested . render ( glyph , 100 , 100 ) ; "<AssertPlaceHolder>" ; verify ( pictureBuilder , times ( 1 ) ) . accept ( eq ( "http://url" ) , any ( java . util . function . Consumer . class ) ) ; } render ( org . uberfire . ext . wires . c... | org . junit . Assert . assertNotNull ( glyphView ) |
testTree ( ) { final com . tinkerpop . pipes . util . structures . Tree < com . syncleus . ferma . VertexFrame > tree = graph . v ( 1 ) . out ( ) . out ( ) . tree ( ) . cap ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return com . gentics . mesh . parameter . image . CropMode . lookup . get ( key ) ; ... | org . junit . Assert . assertEquals ( 1 , tree . get ( graph . v ( 1 ) . next ( ) ) . size ( ) ) |
testFontSize ( ) { java . lang . String expected = "<span<sp>style=\"font-size:<sp>18px;\">text</span>" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( "[size=5]text[/size]" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( ... | org . junit . Assert . assertEquals ( expected , actual ) |
isAccessPrecluded ( ) { final java . lang . String methodName = "isAccessPrecluded" ; try { "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable t ) { com . ibm . ws . webcontainer . security . metadata . SecurityConstraintTest . outputMgr . failWithThrowable ( methodName , t ) ; } } isAccessPrecluded ( ) { final ... | org . junit . Assert . assertFalse ( "The<sp>access<sp>precluded<sp>must<sp>be<sp>the<sp>same<sp>as<sp>the<sp>one<sp>used<sp>in<sp>the<sp>constructor." , com . ibm . ws . webcontainer . security . metadata . SecurityConstraintTest . securityConstraint . isAccessPrecluded ( ) ) |
testValidNonExistingDirectory ( ) { org . sejda . model . output . DirectoryTaskOutput instance = new org . sejda . model . output . DirectoryTaskOutput ( new java . io . File ( "I<sp>dont<sp>exist" ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( instance ) |
shouldGetForFromComponentClientID ( ) { java . util . List < javax . faces . component . UIComponent > components = createComponents ( 2 ) ; given ( components . get ( 0 ) . getClientId ( ) ) . willReturn ( "id1" ) ; given ( components . get ( 1 ) . getClientId ( ) ) . willReturn ( "id2" ) ; org . springframework . spr... | org . junit . Assert . assertThat ( info . getFor ( ) , org . hamcrest . Matchers . is ( "id1" ) ) |
checkSuperAdminAccessToUser ( ) { final org . sentilo . web . catalog . domain . User resource = new org . sentilo . web . catalog . domain . User ( "1" ) ; resource . setTenantId ( org . sentilo . web . catalog . test . security . access . AccessControlServiceImplTest . USER_TENANT_ID ) ; when ( userDetails . isSuperA... | org . junit . Assert . assertTrue ( allowedCRUDL ) |
testReadRpcInputStreamsNoNewEdits ( ) { for ( int jn = 0 ; jn < 3 ; jn ++ ) { org . apache . hadoop . hdfs . qjournal . client . TestQuorumJournalManagerUnit . futureReturns ( org . apache . hadoop . hdfs . qjournal . protocol . QJournalProtocolProtos . GetJournaledEditsResponseProto . newBuilder ( ) . setTxnCount ( 0 ... | org . junit . Assert . assertEquals ( 0 , streams . size ( ) ) |
testEqualsSelf ( ) { org . jfree . data . time . Second second = new org . jfree . data . time . Second ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . time . Millisecond ) ) { return false ; } org . jfree . data . t... | org . junit . Assert . assertTrue ( second . equals ( second ) ) |
testGetPreviousUrl ( ) { org . terasoluna . gfw . web . pagination . PaginationInfo info = new org . terasoluna . gfw . web . pagination . PaginationInfo ( page , pathTmpl , queryTmpl , 0 ) ; java . lang . String expectedURL = "terasoluna?value=test&page=4&size=5" ; java . lang . String previousURL = info . getPrevious... | org . junit . Assert . assertThat ( previousURL , org . hamcrest . CoreMatchers . is ( expectedURL ) ) |
testResolvePackageNameWithNonProjectPath ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final java... | org . junit . Assert . assertNull ( result ) |
testPrimitiveLikeTypeNames_GRE891_4 ( ) { runConformTest ( new java . lang . String [ ] { "}\n" 1 , "}\n" 3 + ( ( ( ( ( "public<sp>class<sp>Foo<sp>{\n" + "public<sp>static<sp>void<sp>main(String[]<sp>args)<sp>{\n" ) + "<sp>pkg.H[][]<sp>zs<sp>=<sp>new<sp>Z().zzz();\n" ) + "<sp>System.out.println(\"works\"}\n" 5 ) + "<sp... | org . junit . Assert . assertEquals ( "}\n" 2 , getReturnTypeOfMethod ( "Z.groovy" , "}\n" 0 ) ) |
testCanIRI1 ( ) { java . lang . String query = "PREFIX<sp>:<sp><http://ontop.inf.unibz.it/test/wellbore#><sp>Select<sp>DISTINCT<sp>?x<sp>?y<sp>WHERE{\n" + ( ( "?x<sp>a<sp>:Wellbore<sp>.\n" + "?x<sp>:inWell<sp>?y<sp>.\n" ) + "}\n" ) ; java . util . ArrayList < java . lang . String > results = runTests ( query ) ; java .... | org . junit . Assert . assertEquals ( 20 , results . size ( ) ) |
testSerialization ( ) { org . jfree . chart . axis . CategoryTick t1 = new org . jfree . chart . axis . CategoryTick ( "C1" , new org . jfree . chart . text . TextBlock ( ) , org . jfree . chart . text . TextBlockAnchor . CENTER , org . jfree . chart . ui . TextAnchor . CENTER , 1.5F ) ; org . jfree . chart . axis . Ca... | org . junit . Assert . assertEquals ( t1 , t2 ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . mapping . model . DDMDataProviderInstance . class , _dynamicQueryClassLoader ) ; dynamic... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
AccessInstanceVariableIndirect_VarVar ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_VarVar" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java ... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
testCharSetNot ( ) { java . lang . String grammar = "lexer<sp>grammar<sp>L;\n" + ( "I<sp>:<sp>~[ab<sp>\\n]<sp>~[<sp>\\ncd]*<sp>{System.out.println(\"I\");}<sp>;\n" + "WS<sp>:<sp>[<sp>\\n\\u000D]+<sp>-><sp>skip<sp>;" ) ; java . lang . String found = execLexer ( "L.g4" , grammar , "L" , "xaf" ) ; java . lang . String exp... | org . junit . Assert . assertEquals ( expecting , found ) |
getFromReferenceReturnsNullWhenDABThrowsException ( ) { when ( this . dab . getDocument ( org . phenotips . entities . spi . AbstractPrimaryEntityManagerTest . PERSON_REFERENCE ) ) . thenThrow ( new java . lang . Exception ( ) ) ; org . phenotips . entities . spi . Person result = this . manager . get ( org . phenotips... | org . junit . Assert . assertNull ( result ) |
constructorSetsFields ( ) { io . motown . domain . api . chargingstation . CreateAndAcceptChargingStationCommand command = new io . motown . domain . api . chargingstation . CreateAndAcceptChargingStationCommand ( CHARGING_STATION_ID , USER_IDENTITIES_WITH_ALL_PERMISSIONS , IDENTITY_CONTEXT ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( io . motown . domain . api . chargingstation . CHARGING_STATION_ID , command . getChargingStationId ( ) ) |
testCreateQuestionGroupSuccess ( ) { org . mifos . platform . questionnaire . ui . model . QuestionGroupForm questionGroup = getQuestionGroupForm ( ( ( "<sp>" + ( org . mifos . platform . questionnaire . ui . controller . QuestionGroupControllerTest . TITLE ) ) + "<sp>" ) , "Create.Client" , "S1" , "S2" ) ; java . lang... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( "success" ) ) |
getMeasurements ( com . netflix . spectator . api . Measurement ) { node . addMeasurement ( measurement ) ; "<AssertPlaceHolder>" ; } getMeasurements ( ) { return measurements ; } | org . junit . Assert . assertThat ( node . getMeasurements ( ) , org . hamcrest . Matchers . contains ( measurement ) ) |
testDefaultSourceCodeNamesList ( ) { System . out . println ( "testDefaultSourceCodeNamesList" ) ; java . util . List < java . lang . String > defaultSourceCodeNamesList = java . util . Arrays . asList ( net . sourceforge . pmd . util . database . DBURITest . C_DEFAULT_SOURCE_CODE_NAMES . split ( "," ) ) ; net . source... | org . junit . Assert . assertEquals ( defaultSourceCodeNamesList , result ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( locks . isEmpty ( ) ) |
testGetServer_None ( ) { tls = new org . apache . accumulo . server . master . state . TabletLocationState ( keyExtent , null , null , null , null , org . apache . accumulo . server . master . state . TabletLocationStateTest . walogs , true ) ; "<AssertPlaceHolder>" ; } getServer ( ) { return server ; } | org . junit . Assert . assertNull ( tls . getServer ( ) ) |
loadMessagePropertiesFromDB_empty ( ) { doReturn ( marketplace ) . when ( ds ) . getReferenceByBusinessKey ( any ( org . oscm . domobjects . Marketplace . class ) ) ; doReturn ( new java . util . Properties ( ) ) . when ( localizerService ) . loadLocalizedPropertiesFromDatabase ( anyLong ( ) , any ( org . oscm . domobj... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testConvert ( ) { 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 ( ) ; java . lang . String cipher = "cipher" ; org . lnu . is . domain . specialty . Specialty parent = ne... | org . junit . Assert . assertEquals ( expected , actual ) |
testExecuteWithNone ( ) { java . util . Collection < org . eurekastreams . server . domain . stream . HashTag > results = sut . execute ( new java . util . ArrayList < java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org . eurekastreams . server... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
encryptInTryWithResources_decryptInTryWithRessources_fails ( ) { java . io . ByteArrayOutputStream result = new java . io . ByteArrayOutputStream ( ) ; try ( final java . io . OutputStream outputStream = name . neuhalfen . projects . crypto . bouncycastle . openpgp . BouncyGPG . encryptToStream ( ) . withConfig ( name ... | org . junit . Assert . assertArrayEquals ( ExampleMessages . IMPORTANT_QUOTE_TEXT . getBytes ( ) , plainBA . toByteArray ( ) ) |
testSerializeLandingPage ( ) { com . urbanairship . api . push . model . notification . actions . Actions actions = createLandingPageActions ( ) ; java . lang . String json = com . urbanairship . api . push . parse . notification . actions . ActionsSerializationTest . mapper . writeValueAsString ( actions ) ; com . urb... | org . junit . Assert . assertEquals ( actions , actionsRoundTripped ) |
testNewDeployer_noArtifact ( ) { org . mockito . Mockito . when ( deployMojo . isAppEngineCompatiblePackaging ( ) ) . thenReturn ( true ) ; try { new com . google . cloud . tools . maven . deploy . Deployer . Factory ( ) . newDeployer ( deployMojo ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . maven . p... | org . junit . Assert . assertEquals ( ( "\nCould<sp>not<sp>determine<sp>appengine<sp>environment,<sp>did<sp>you<sp>package<sp>your<sp>application?" + "\nRun<sp>\'mvn<sp>package<sp>appengine:deploy\'" ) , ex . getMessage ( ) ) |
testReducerForBytesWritableKeyAndValue ( ) { org . apache . hadoop . io . BytesWritable key = new org . apache . hadoop . io . BytesWritable ( "abc123" . getBytes ( ) ) ; co . nubetech . hiho . dedup . HihoTuple hihoTuple = new co . nubetech . hiho . dedup . HihoTuple ( ) ; hihoTuple . setKey ( key ) ; co . nubetech . ... | org . junit . Assert . assertEquals ( 1 , context . getCounter ( MergeRecordCounter . OUTPUT ) . getValue ( ) ) |
decrypt ( ) { java . lang . String data = "{}" ; try { hudson . util . Secret secret = hudson . util . Secret . decrypt ( data ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . ArrayIndexOutOfBoundsException e ) { org . junit . Assert . fail ( ( data + "<sp>shouldn't<sp>throw<sp>an<sp>ArrayIndexOutOfBoundsException<s... | org . junit . Assert . assertNull ( secret ) |
ratingLookup ( ) { java . lang . String expected = "http://musicbrainz.org/ws/2/artist/b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d?inc=ratings" ; java . lang . String actual = org . musicbrainz . android . api . webservice . QueryBuilder . ratingLookup ( Entity . ARTIST , "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d" ) ; "<AssertPla... | org . junit . Assert . assertEquals ( expected , actual ) |
getInfoAllFields ( ) { try ( alluxio . client . MetaMasterClient client = new alluxio . client . RetryHandlingMetaMasterClient ( alluxio . master . MasterClientContext . newBuilder ( alluxio . ClientContext . create ( alluxio . conf . ServerConfiguration . global ( ) ) ) . build ( ) ) ) { alluxio . grpc . MasterInfo in... | org . junit . Assert . assertEquals ( mWebPort , info . getWebPort ( ) ) |
testInterfaceDefaultEmptyString ( ) { org . skife . config . TestCollections . EmptyInterfaceEmptyString ec = cof . build ( org . skife . config . TestCollections . EmptyInterfaceEmptyString . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , ec . getValue ( ) ) |
simpleTest ( ) { java . lang . String testString = "this<sp>is<sp>a<sp>simple<sp>test" ; byte [ ] compressed = smaz . compress ( testString ) ; java . lang . String uncompressedString = smaz . decompress ( compressed ) ; "<AssertPlaceHolder>" ; } decompress ( byte [ ] ) { java . lang . StringBuilder out = new java . la... | org . junit . Assert . assertEquals ( testString , uncompressedString ) |
byteFormatCheck ( ) { boolean isFinalFrame = false ; nonce_ = com . amazonaws . encryptionsdk . model . ByteFormatCheckValues . getNonce ( ) ; final com . amazonaws . encryptionsdk . model . CipherFrameHeaders cipherFrameHeaders = new com . amazonaws . encryptionsdk . model . CipherFrameHeaders ( testSeqNum_ , nonce_ ,... | org . junit . Assert . assertArrayEquals ( com . amazonaws . encryptionsdk . model . ByteFormatCheckValues . getCipherFrameHeaderHash ( ) , cipherFrameHeaderHash ) |
testWriteStringToFileWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines ( ) { final java . io . File file = org . apache . commons . io . testtools . TestUtils . newFile ( getTestDirectory ( ) , "lines.txt" ) ; org . apache . commons . io . FileUtils . writeStringToFile ( file , "This<sp>line<sp>was<sp>th... | org . junit . Assert . assertEquals ( expected , actual ) |
testUnsupportedTypeArray ( ) { org . switchyard . serial . jackson . JacksonSerializationData . Car car = new org . switchyard . serial . jackson . JacksonSerializationData . Car ( ) ; car . setCheapParts ( new org . switchyard . serial . jackson . JacksonSerializationData . Part [ ] { new org . switchyard . serial . j... | org . junit . Assert . assertEquals ( 1 , car . getCheapParts ( ) . length ) |
simpleCountdownTest ( ) { java . util . List < org . apache . apex . malhar . lib . appdata . gpo . GPOMutable > dataValues = createValues ( ) ; org . apache . apex . malhar . lib . appdata . schemas . DataQuerySnapshot gQuery = new org . apache . apex . malhar . lib . appdata . schemas . DataQuerySnapshot ( "1" , new ... | org . junit . Assert . assertEquals ( 2 , countdown ) |
testDelegationConfigurationWithPrefix ( ) { java . lang . String prefix = "pref-" ; java . lang . String expectedKey = "key" ; backingConf = new org . apache . flink . configuration . Configuration ( ) ; backingConf . setValueInternal ( "test-key" , "value" ) ; configuration = new org . apache . flink . configuration .... | org . junit . Assert . assertTrue ( keySet . isEmpty ( ) ) |
createWithSpecificConf ( ) { com . google . code . ssm . providers . elasticache . ElastiCacheConfiguration conf = new com . google . code . ssm . providers . elasticache . ElastiCacheConfiguration ( ) ; conf . setConsistentHashing ( true ) ; conf . setOperationTimeout ( 100 ) ; conf . setUseBinaryProtocol ( false ) ; ... | org . junit . Assert . assertNotNull ( client ) |
testCreateAndReadFileWithShiftToEnd ( ) { byte [ ] bytes = "testData" . getBytes ( StandardCharsets . UTF_8 ) ; create ( "testFile" , bytes ) ; int bytesToSkip = bytes . length ; byte [ ] expected = java . util . Arrays . copyOfRange ( bytes , bytesToSkip , bytes . length ) ; "<AssertPlaceHolder>" ; } read ( java . lan... | org . junit . Assert . assertArrayEquals ( expected , read ( "testFile" , bytesToSkip ) ) |
testBasicAesCtrHmacAead ( ) { byte [ ] aesCtrKeyValue = com . google . crypto . tink . subtle . Random . randBytes ( com . google . crypto . tink . aead . AeadIntegrationTest . AES_KEY_SIZE ) ; byte [ ] hmacKeyValue = com . google . crypto . tink . subtle . Random . randBytes ( com . google . crypto . tink . aead . Aea... | org . junit . Assert . assertArrayEquals ( plaintext , decrypted ) |
testAddRdn004 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "" ) ; javax . naming . ldap . Rdn toadd = new javax . naming . ldap . Rdn ( "" ) ; ln . add ( toadd ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; } | org . junit . Assert . assertEquals ( "" , ln . toString ( ) ) |
testSimpleHigherPriorityAddition ( ) { com . killeent . PriorityQueue . PriorityQueue < java . lang . String > heap = new com . killeent . PriorityQueue . Heap < java . lang . String > ( new com . killeent . HeapTest . StringComparator ( ) ) ; heap . add ( "a" ) ; heap . add ( "b" ) ; "<AssertPlaceHolder>" ; } peek ( )... | org . junit . Assert . assertEquals ( "a" , heap . peek ( ) ) |
testIncrementMulti ( ) { counter . add ( 2 ) ; counter . add ( 1 ) ; "<AssertPlaceHolder>" ; } value ( ) { return value ; } | org . junit . Assert . assertEquals ( 3 , counter . value ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.