input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldAccessObjectIdPropertyForFolder ( ) { javax . jcr . Node node = getSession ( ) . getNode ( "/cmis/My_Folder-0-0" ) ; java . lang . String objectId = node . getProperty ( "jcr:uuid" ) . getString ( ) ; "<AssertPlaceHolder>" ; } getString ( ) { return value ; } | org . junit . Assert . assertTrue ( ( objectId != null ) ) |
testBuildWithDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . street . type . StreetType context = new org . lnu . is . domain . street . type . StreetType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>StreetType<sp>e<sp>" ; org .... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testConcurrentUpdateOfKeyWhileIterating ( ) { final java . util . Map < org . terracotta . offheapstore . util . Generator . SpecialInteger , org . terracotta . offheapstore . util . Generator . SpecialInteger > m = createMap ( generator ) ; org . junit . Assume . assumeThat ( m , org . hamcrest . core . IsNot . not ( ... | org . junit . Assert . assertTrue ( foundMagicKey ) |
testGetAllProjectContributors ( ) { try { br . ufpe . cin . groundhog . Project project = new br . ufpe . cin . groundhog . Project ( new br . ufpe . cin . groundhog . User ( "twitter" ) , "ambrose" ) ; java . util . List < br . ufpe . cin . groundhog . Contributor > contributors = searchGitHub . getAllProjectContribut... | org . junit . Assert . assertNotNull ( contributors ) |
ibanShouldReturnValidCountryCode ( ) { org . iban4j . Iban iban = new org . iban4j . Iban . Builder ( ) . countryCode ( CountryCode . AT ) . bankCode ( "19043" ) . accountNumber ( "00234573201" ) . build ( ) ; "<AssertPlaceHolder>" ; } getCountryCode ( ) { return org . iban4j . CountryCode . getByCode ( org . iban4j . ... | org . junit . Assert . assertThat ( iban . getCountryCode ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( CountryCode . AT ) ) ) |
testHostDifferentCase ( ) { java . lang . String host = "matthieu-test.woonoz.dev" ; java . lang . String expectedRewritedHost = "google.com" ; com . woonoz . proxy . servlet . UrlRewriter rewriter = org . easymock . EasyMock . createMock ( com . woonoz . proxy . servlet . UrlRewriter . class ) ; org . easymock . EasyM... | org . junit . Assert . assertEquals ( expectedRewritedHost , actualValue ) |
testIgnoreOtherThrowables ( ) { "<AssertPlaceHolder>" ; } resolve ( java . lang . Throwable ) { nl . _42 . jarb . constraint . violation . DatabaseConstraintViolation violation = null ; java . lang . String message = nl . _42 . jarb . constraint . violation . resolver . RootCauseMessageViolationResolver . getRootCause ... | org . junit . Assert . assertNull ( resolver . resolve ( new java . lang . RuntimeException ( ) ) ) |
createUserJPA ( ) { logger . debug ( "create<sp>User" ) ; fr . valtech . angularspring . app . domain . User user = userRepository . save ( new fr . valtech . angularspring . app . domain . User ( "N" , "L" ) ) ; logger . debug ( ( "User<sp>created<sp>-<sp>id<sp>:<sp>" + ( user . getId ( ) ) ) ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertNotNull ( user . getId ( ) ) |
testGetPermissionRoles ( ) { java . lang . String adminRole = "adminRole" ; userRoleListResource . adminRole = adminRole ; org . pentaho . platform . web . http . api . resources . RoleListWrapper mockWrapper = mock ( org . pentaho . platform . web . http . api . resources . RoleListWrapper . class ) ; doReturn ( mockW... | org . junit . Assert . assertEquals ( mockWrapper , testWrapper ) |
testInsertToDoItems ( ) { int items = ( ( java . lang . System . getProperty ( "items" ) ) != null ) ? java . lang . Integer . parseInt ( java . lang . System . getProperty ( "items" ) ) : 1 ; createAndInsertToDoItems ( items ) ; java . util . List < com . manning . gia . todo . model . ToDoItem > toDoItems = inMemoryT... | org . junit . Assert . assertEquals ( items , toDoItems . size ( ) ) |
testRD ( ) { final org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . network . instance . types . rev151018 . RouteDistinguisher rd = org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . network . instance . types . rev151018 . RouteDistinguisherBuilder . getDefaultInstance ( or... | org . junit . Assert . assertEquals ( org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . network . instance . types . rev151018 . RouteDistinguisherBuilderTest . RD , rd . getString ( ) ) |
test40getXPermMapNull ( ) { org . mockito . Mockito . when ( xUserMgr . getXPermMap ( id ) ) . thenReturn ( null ) ; org . apache . ranger . view . VXPermMap retVxGroup = xUserRest . getXPermMap ( id ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( xUserMgr ) . getXPermMap ( id ) ; } getXPermMap ( java . ... | org . junit . Assert . assertNull ( retVxGroup ) |
removeAll ( ) { observable . add ( 1 , 1 ) ; observable . add ( 2 , 2 ) ; observable . add ( 3 , 3 ) ; com . google . common . collect . Multiset < java . lang . Integer > backupMultiset = com . google . common . collect . HashMultiset . create ( ) ; backupMultiset . add ( 1 , 1 ) ; backupMultiset . add ( 2 , 2 ) ; bac... | org . junit . Assert . assertEquals ( backupMultiset . removeAll ( toRemove ) , observable . removeAll ( toRemove ) ) |
verifyMethodName ( ) { java . lang . reflect . Method triggerMethod = org . androidtransfuse . event . EventObserver . class . getMethod ( EventObserver . TRIGGER , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } getMethod ( java . lang . String , org . androidtransfuse . gen . ASTType ) { for ( org . androi... | org . junit . Assert . assertNotNull ( triggerMethod ) |
softResetRejectedVerifyReturnValue ( ) { when ( chargePointService . reset ( any ( io . motown . ocpp . v12 . soap . chargepoint . ResetRequest . class ) , anyString ( ) ) ) . thenReturn ( getResetResponse ( ResetStatus . REJECTED ) ) ; boolean hasReset = client . softReset ( io . motown . ocpp . v12 . soap . chargepoi... | org . junit . Assert . assertFalse ( hasReset ) |
testIncoherentTBox ( ) { org . obolibrary . robot . OWLOntology ontology = loadOntology ( "/incoherent-tbox.owl" ) ; org . semanticweb . owlapi . reasoner . OWLReasonerFactory reasonerFactory = new org . semanticweb . elk . owlapi . ElkReasonerFactory ( ) ; org . semanticweb . owlapi . reasoner . OWLReasoner reasoner =... | org . junit . Assert . assertTrue ( isCaughtException ) |
testMatchesIsoCompatibleProprietaryCommandApdu_GenericInterIndustryPlain ( ) { byte [ ] apdu = de . persosim . simulator . utils . HexString . toByteArray ( "00F1F2F3" ) ; boolean result = de . persosim . simulator . apdu . CommandApduFactory . matchesIsoCompatibleProprietaryCommandApdu ( apdu ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertFalse ( result ) |
testVoerRegelUitGeeftGeenMelding ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoonView = new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( nl . bzk . brp . util . testpersoonbouwers . TestPersoonJohnnyJordaan . maak ( ) ) ; final nl . bzk . brp . busin... | org . junit . Assert . assertTrue ( resultaat ) |
getSetCharacter ( ) { this . model . setCharacter ( 345 ) ; "<AssertPlaceHolder>" ; } getCharacter ( ) { return character ; } | org . junit . Assert . assertEquals ( 345 , this . model . getCharacter ( ) ) |
getPropertyDisplayNameWhenDisplayNameIsSetButEmptyShouldReturnTechnicalKey ( ) { java . lang . String displayName = "" ; java . lang . String technicalKey = "technicalKey" ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withDisplayName ( displayName ) . withTechn... | org . junit . Assert . assertEquals ( technicalKey , propertyDisplayName ) |
makeDirectoryTestCallHostPlugingReturningSomething ( ) { boolean makeDirectoryReturn = configureAndExecuteMakeDirectoryMethodForTest ( pathMock , "/fictitious/path/to/use/in/unit/test" ) ; "<AssertPlaceHolder>" ; } configureAndExecuteMakeDirectoryMethodForTest ( java . lang . String , java . lang . String ) { org . moc... | org . junit . Assert . assertTrue ( makeDirectoryReturn ) |
testCodasAreIsolated ( ) { org . apache . tomcat . util . descriptor . web . JspPropertyGroup jpg = new org . apache . tomcat . util . descriptor . web . JspPropertyGroup ( ) ; jpg . addIncludeCoda ( "coda" ) ; org . apache . tomcat . util . descriptor . web . JspPropertyGroupDescriptorImpl descriptor = new org . apach... | org . junit . Assert . assertEquals ( 1 , descriptor . getIncludeCodas ( ) . size ( ) ) |
testConstruction ( ) { this . dataWrapper = new edu . cmu . tetradapp . model . DataWrapper ( new edu . cmu . tetrad . util . Parameters ( ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( dataWrapper ) |
testBuild ( ) { org . lnu . is . domain . person . award . PersonAward context = new org . lnu . is . domain . person . award . PersonAward ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAward<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . ... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testQueryForAdminsThatMustBeNotified_negative ( ) { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Category cat = ( ( org . oscm . domo... | org . junit . Assert . assertEquals ( 0 , admins . size ( ) ) |
testTrackerGpu_1 ( ) { if ( ! ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . getClass ( ) . getCanonicalName ( ) . toLowerCase ( ) . contains ( "cuda" ) ) ) return ; lombok . val fa = new float [ 100000000 ] ; lombok . val array = org . nd4j . linalg . factory . Nd4j . create ( fa , new int [ ] { 10000 ,... | org . junit . Assert . assertTrue ( ( bw > 0 ) ) |
testAcceptValidParameter2 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "add<sp>property<sp>?" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleS... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( true ) ) |
shouldGetCredentialsFromSysEnv ( ) { br . com . uol . pagseguro . api . credential . Credential expectedCredential = br . com . uol . pagseguro . api . credential . Credential . sellerCredential ( "email" , "token" ) ; when ( jvmEnvVariableCredentialProvider . getCredential ( ) ) . thenThrow ( new java . lang . Illegal... | org . junit . Assert . assertEquals ( expectedCredential , credential ) |
testGetWindow_WithRegexp_succeeds ( ) { doTestWithNotepad ( ( instance , app ) -> { mmarquee . automation . controls . AutomationWindow window = instance . getWindow ( java . util . regex . Pattern . compile ( java . util . regex . Pattern . quote ( getLocal ( "notepad.title" ) ) ) ) ; "<AssertPlaceHolder>" ; } ) ; } g... | org . junit . Assert . assertNotNull ( window ) |
rexecuteTest_SelectPriorityFilter ( ) { com . jmethods . catatumbo . EntityQueryRequest request = com . jmethods . catatumbo . EntityManagerTest . em . createEntityQueryRequest ( "SELECT<sp>*<sp>FROM<sp>Task<sp>WHERE<sp>priority<sp>=<sp>@1<sp>order<sp>by<sp>__key__" ) ; request . addPositionalBinding ( 0 ) ; com . jmet... | org . junit . Assert . assertTrue ( ( ( ( ( tasks . size ( ) ) == 10 ) && ( ( tasks . get ( 0 ) . getId ( ) ) == 5 ) ) && ( ( tasks . get ( ( ( tasks . size ( ) ) - 1 ) ) . getId ( ) ) == 50 ) ) ) |
refinementAttributeEqualsSingleMatch ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:%s=%s" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowo... | org . junit . Assert . assertEquals ( expected , actual ) |
testPushHandler ( ) { clientPair . hardwareClient . send ( "push<sp>Yo!" ) ; org . mockito . ArgumentCaptor < cc . blynk . server . notifications . push . android . AndroidGCMMessage > objectArgumentCaptor = org . mockito . ArgumentCaptor . forClass ( cc . blynk . server . notifications . push . android . AndroidGCMMes... | org . junit . Assert . assertEquals ( expectedJson , message . toJson ( ) ) |
cantZoomInIfMaxValue ( ) { pipe . actions . gui . ZoomManager zoomUI = new pipe . actions . gui . ZoomUI ( pipe . views . ZoomUITest . MAX_ZOOM , pipe . views . ZoomUITest . ZOOM_INCREMENT , pipe . views . ZoomUITest . MAX_ZOOM , pipe . views . ZoomUITest . MIN_ZOOM , null ) ; "<AssertPlaceHolder>" ; } canZoomIn ( ) { ... | org . junit . Assert . assertFalse ( zoomUI . canZoomIn ( ) ) |
testMultiTokenizationFindsAll ( ) { java . lang . String input = "" ; java . util . List < java . util . List < com . atilika . kuromoji . naist . jdic . Token > > tokenLists = tokenizer . multiTokenizeNBest ( input , 100 ) ; "<AssertPlaceHolder>" ; } size ( ) { return costs . size ( ) ; } | org . junit . Assert . assertEquals ( 9 , tokenLists . size ( ) ) |
testGetCreatedItems_DoesNotContainNullItems ( ) { tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; tree . setItemCount ( 100 ) ; tree . setSize ( 100 , 100 ) ; "<AssertPlaceHolder>" ; } getCreatedItems ( ) { org . eclipse . swt . widgets . TreeItem [ ] result ; if ( pare... | org . junit . Assert . assertTrue ( ( ( tree . getCreatedItems ( ) . length ) < 10 ) ) |
test6 ( ) { java . util . List < io . djigger . aggregation . Thread > threads = threads ( new java . lang . Object [ ] [ ] { new java . lang . Object [ ] { "m1" , "m2" , "m3" } , new java . lang . Object [ ] { "m1" , "m4" , "m5" } , new java . lang . Object [ ] { "m1" , "m2" , "m3" } } ) ; final java . util . List < i... | org . junit . Assert . assertEquals ( 7 , events . size ( ) ) |
testInstalledEventRemote ( ) { mastershipService . setMastership ( org . onosproject . newoptical . OpticalPathProvisionerTest . DEVICE2 . id ( ) , MastershipRole . NONE ) ; org . onlab . util . Bandwidth bandwidth = org . onlab . util . Bandwidth . bps ( 100 ) ; java . time . Duration latency = java . time . Duration ... | org . junit . Assert . assertEquals ( 0 , listener . events . size ( ) ) |
testNullPayload ( ) { com . nextdoor . bender . operation . json . key . KeyNameOperation operation = new com . nextdoor . bender . operation . json . key . KeyNameOperation ( ) ; com . nextdoor . bender . testutils . DummyDeserializerHelper . DummpyEvent devent = new com . nextdoor . bender . testutils . DummyDeserial... | org . junit . Assert . assertEquals ( null , output ) |
testNoTraffic ( ) { final io . pkts . streams . impl . SimpleCallStateMachine fsm = new io . pkts . streams . impl . SimpleCallStateMachine ( "abcd-123" ) ; "<AssertPlaceHolder>" ; } getTransitions ( ) { return java . util . Collections . unmodifiableList ( this . callTransitions ) ; } | org . junit . Assert . assertThat ( fsm . getTransitions ( ) . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testNormalResultSetExactSize ( ) { org . terrier . matching . ResultSet r = new org . terrier . matching . QueryResultSet ( 10 ) ; r . setExactResultSize ( 1000 ) ; org . terrier . matching . ResultSet r2 = r . getResultSet ( 0 , 5 ) ; "<AssertPlaceHolder>" ; } getExactResultSize ( ) { return exactResultSize ; } | org . junit . Assert . assertEquals ( 1000 , r2 . getExactResultSize ( ) ) |
testTableSink ( ) { io . cdap . cdap . api . data . schema . Schema outputSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "purchase" , Schema . Field . of ( "user" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "count" , io . cdap . cdap... | org . junit . Assert . assertEquals ( outputSchema , mockPipelineConfigurer . getOutputSchema ( ) ) |
testIsWriteScript ( ) { classUnderTest . setWriteScript ( true ) ; "<AssertPlaceHolder>" ; } isWriteScript ( ) { return writeScript ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isWriteScript ( ) ) |
testReadByte ( ) { byte [ ] bytes = new byte [ com . liferay . portal . kernel . io . DeserializerTest . _COUNT ] ; _random . nextBytes ( bytes ) ; java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . wrap ( bytes ) ; com . liferay . portal . kernel . io . Deserializer deserializer = new com . liferay . porta... | org . junit . Assert . assertEquals ( bytes [ i ] , deserializer . readByte ( ) ) |
testGetIntegerPropetry ( ) { javax . jms . JMSProducer producer = context . createProducer ( ) ; producer . setProperty ( INTEGER_PROPERTY_NAME , INTEGER_PROPERTY_VALUE ) ; "<AssertPlaceHolder>" ; } getIntProperty ( java . lang . String ) { try { return convertPropertyTo ( name , messageProperties . get ( name ) , org ... | org . junit . Assert . assertEquals ( INTEGER_PROPERTY_VALUE , producer . getIntProperty ( INTEGER_PROPERTY_NAME ) ) |
testConfiguredIndependentTimeout ( ) { org . glassfish . grizzly . http . server . HttpServer httpServer = org . glassfish . grizzly . http . server . HttpServer . createSimpleServer ( "." , org . glassfish . grizzly . websockets . TimeoutTest . PORT ) ; httpServer . getServerConfiguration ( ) . setHttpServerName ( "We... | org . junit . Assert . assertFalse ( socket . isConnected ( ) ) |
reverseForEach_emptyList ( ) { java . util . ArrayList < java . lang . Integer > integers = new java . util . ArrayList ( ) ; com . gs . collections . api . list . MutableList < java . lang . Integer > results = Lists . mutable . of ( ) ; com . gs . collections . impl . utility . ArrayListIterate . reverseForEach ( int... | org . junit . Assert . assertEquals ( integers , results ) |
shouldFindChildButtonByTagName ( ) { openStartActivity ( ) ; org . openqa . selenium . WebElement rootElement = driver ( ) . findElement ( org . openqa . selenium . By . id ( "l10n" ) ) ; java . lang . String buttonText = "EN<sp>Button" ; org . openqa . selenium . WebElement clickMe = rootElement . findElement ( org . ... | org . junit . Assert . assertEquals ( clickMe . getText ( ) , buttonText ) |
savePropertyDescriptorForOwnerWhenDescriptorIdIsNotNullNoForeignableFieldsChangedButDifferentOwnerShouldSavePropertyDescriptor ( ) { ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner changingOwner = ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner . AMW ;... | org . junit . Assert . assertNotNull ( descriptor . getId ( ) ) |
testResetPasswordByManager ( ) { org . traccar . web . server . model . User manager = new org . traccar . web . server . model . User ( "manager" , "manager" ) ; manager . setManager ( Boolean . TRUE ) ; manager = org . traccar . web . server . model . DataServiceTest . dataService . addUser ( manager ) ; org . tracca... | org . junit . Assert . assertEquals ( "test1" , user . getPassword ( ) ) |
testSaveAndQuerySingleChunkStream ( ) { byte [ ] testBlob = buildTestBlob ( org . calrissian . accumulorecipes . blobstore . impl . AccumuloBlobStoreTest . CHUNK_SIZE ) ; org . calrissian . accumulorecipes . blobstore . impl . AccumuloBlobStore blobStore = new org . calrissian . accumulorecipes . blobstore . impl . Acc... | org . junit . Assert . assertArrayEquals ( testBlob , actual ) |
testModelFileDownloadContent ( ) { repositoryServer . perform ( get ( ( ( "/api/v1/models/" + ( testModel . prettyName ) ) + "/file" ) ) . with ( userCreator ) ) . andExpect ( status ( ) . isOk ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { org . eclipse . vorto . repository . core . impl . StorageIte... | org . junit . Assert . assertTrue ( true ) |
testChannelException ( ) { org . apache . flume . Context context = new org . apache . flume . Context ( ) ; context . put ( "sink.directory" , tmpDir . getPath ( ) ) ; context . put ( "sink.rollInterval" , "0" ) ; context . put ( "sink.batchSize" , "1" ) ; org . apache . flume . Channel channel = org . mockito . Mocki... | org . junit . Assert . assertEquals ( 1 , sinkCounter . getChannelReadFail ( ) ) |
testFromApplicationsToDTO ( ) { org . wso2 . carbon . apimgt . core . models . Application application1 = new org . wso2 . carbon . apimgt . core . models . Application ( "application1" , "user1" ) ; application1 . setId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; application1 . setDescription ( "applicati... | org . junit . Assert . assertEquals ( applicationListDTO . getList ( ) . get ( 0 ) . getName ( ) , "application1" ) |
qlAgeLessthanequal ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>age<sp><=<sp>16<sp>LIMIT<sp>20" ; java . lang . String api = "select<sp>*<sp>where<sp>age<sp><=<sp>16" ; int limit = 20 ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . qu... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
testArtemisJMSClient ( ) { javax . jms . ConnectionFactory cf = new org . apache . activemq . artemis . jms . client . ActiveMQJMSConnectionFactory ( "tcp://localhost:61616" ) ; try ( javax . jms . Connection connection = cf . createConnection ( ) ) { javax . jms . Session session = connection . createSession ( false ,... | org . junit . Assert . assertEquals ( textMessage , messageReceived . getText ( ) ) |
getPropertyNullWithPrivateFields ( ) { final com . esotericsoftware . yamlbeans . Beans . Property nullProperty = com . esotericsoftware . yamlbeans . Beans . getProperty ( com . esotericsoftware . yamlbeans . BeansTest . MockClass . class , "nullType" , false , true , yamlConfig ) ; "<AssertPlaceHolder>" ; } getProper... | org . junit . Assert . assertNull ( nullProperty ) |
testGetTomorrowDate ( ) { java . util . Calendar cal = new java . util . GregorianCalendar ( ) ; cal . roll ( Calendar . DATE , true ) ; java . util . Date expected = cal . getTime ( ) ; java . util . Date actual = info . michaelkohler . helpertools . date . DateHelper . tomorrowDate ( ) ; "<AssertPlaceHolder>" ; } com... | org . junit . Assert . assertTrue ( compareDatesToTheMinutes ( actual , expected ) ) |
shouldHideBookWholeWeekIconWhenADayIsLocked ( ) { startWithLockedDays ( tomorrowAsList ) ; org . apache . wicket . Component book = tester . getComponentFromLastRenderedPage ( ( ( net . rrm . ehour . ui . timesheet . panel . TimesheetPanelTest . TIMESHEET_PATH ) + ":blueFrame:blueFrame_body:customers:0:rows:0:bookWhole... | org . junit . Assert . assertNull ( book ) |
testQueryStringMissingKey ( ) { try { java . lang . String queryString = "=4" ; java . net . URI requestUri = new java . net . URI ( ( ( ( org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . URI_STRING ) + "?" ) + queryString ) ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ... | org . junit . Assert . assertTrue ( false ) |
shouldIgnoreWhenOutOfBoundsRightPartially ( ) { glass . drop ( new com . codenjoy . dojo . tetris . model . FigureImpl ( 0 , 0 , "##" ) , ( ( com . codenjoy . dojo . tetris . model . TestUtils . WIDTH ) - 1 ) , ( ( com . codenjoy . dojo . tetris . model . TestUtils . HEIGHT ) - 1 ) ) ; "<AssertPlaceHolder>" ; } isEmpty... | org . junit . Assert . assertTrue ( glass . isEmpty ( ) ) |
testGetServiceNonExistent ( ) { flex . messaging . services . Service actual = broker . getService ( "non-existent-id" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( actual ) |
uniquelong ( ) { long [ ] unique = new long [ 10000 ] ; for ( int i = 0 ; i < ( unique . length ) ; i ++ ) { unique [ i ] = org . candlepin . util . Util . generateUniqueLong ( ) ; } java . util . Set < java . lang . Long > nodupes = new java . util . HashSet ( ) ; for ( int i = 0 ; i < ( unique . length ) ; i ++ ) { n... | org . junit . Assert . assertEquals ( unique . length , nodupes . size ( ) ) |
testGeneric ( ) { org . apache . avro . Schema schema = new org . apache . avro . Schema . Parser ( ) . parse ( org . apache . beam . vendor . guava . v20_0 . com . google . common . io . Resources . getResource ( "person.avsc" ) . openStream ( ) ) ; org . apache . avro . generic . GenericRecord savedRecord = new org .... | org . junit . Assert . assertEquals ( org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . Lists . newArrayList ( savedRecord ) , records ) |
refcountIncDecFalse ( ) { final org . opendaylight . yangtools . yang . model . repo . util . RefcountedRegistration ref = new org . opendaylight . yangtools . yang . model . repo . util . RefcountedRegistration ( reg ) ; ref . incRef ( ) ; "<AssertPlaceHolder>" ; verify ( reg , times ( 0 ) ) . close ( ) ; } decRef ( )... | org . junit . Assert . assertFalse ( ref . decRef ( ) ) |
getRootLocations_shouldReturnOnlyUnretiredRootLocations ( ) { java . util . List < org . openmrs . Location > locations = org . openmrs . api . context . Context . getLocationService ( ) . getRootLocations ( false ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m ... | org . junit . Assert . assertEquals ( 2 , locations . size ( ) ) |
bodiesMustBeSucessful ( ) { kong . unirest . PagedList < java . lang . String > list = new kong . unirest . PagedList ( ) ; list . addAll ( asList ( mkRequest ( "foo" ) , mkRequest ( null ) , mkRequest ( "baz" ) ) ) ; java . util . List < java . lang . String > bodies = list . getBodies ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "foo" , "baz" ) , bodies ) |
testZremrangebyrank ( ) { redis1 . zadd ( key , 1 , "a" ) ; redis1 . zadd ( key , 2 , "b" ) ; redis1 . zadd ( key , 3 , "c" ) ; redis1 . zremrangebyrank ( key , 0 , 1 ) ; java . util . Set < java . lang . String > set = redis1 . zrange ( key , 0 , ( - 1 ) ) ; "<AssertPlaceHolder>" ; System . out . println ( java . lang... | org . junit . Assert . assertEquals ( set . iterator ( ) . next ( ) , "c" ) |
testFromEbXML ( ) { transformer . toEbXML ( query , ebXML ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetFoldersForDocumentQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetFoldersForDocumentQuery ( ) ; transformer . fromEbXML ( result , eb... | org . junit . Assert . assertEquals ( query , result ) |
testGetSequenceDesc_assignId ( ) { java . lang . reflect . Field field = getClass ( ) . getDeclaredField ( "assignId" ) ; org . seasar . extension . jdbc . EntityMeta entityMeta = new org . seasar . extension . jdbc . EntityMeta ( ) ; org . seasar . extension . jdbc . PropertyMeta propertyMeta = propertyMetaFactory . c... | org . junit . Assert . assertNull ( sequenceDesc ) |
testGetCache ( ) { com . bixly . pastevid . recorders . AudioRecorderTest . log ( "getCache" ) ; com . bixly . pastevid . recorders . AudioRecorder instance = recorder . getAudioRecorder ( ) ; "<AssertPlaceHolder>" ; } getCache ( ) { return this . audioCache ; } | org . junit . Assert . assertNotNull ( instance . getCache ( ) ) |
testNullSetToNullString_OK ( ) { org . vaadin . example . customer . CollectionToCommaSeparatedStringConverter converter = new org . vaadin . example . customer . CollectionToCommaSeparatedStringConverter ( ) ; "<AssertPlaceHolder>" ; } convertToModel ( java . lang . String , java . lang . Class , java . util . Locale ... | org . junit . Assert . assertNull ( converter . convertToModel ( null , java . lang . String . class , null ) ) |
iteratorRaisesOnInvalidMagic ( ) { java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 1024 ) ; org . apache . kafka . common . record . MemoryRecordsBuilder builder = org . apache . kafka . common . record . MemoryRecords . builder ( buffer , CompressionType . NONE , TimestampType . CREATE_TIME , 0L ... | org . junit . Assert . assertNotNull ( logInputStream . nextBatch ( ) ) |
everyoneCanGetEntry ( ) { dummyLogin . login ( "aUser" ) ; try ( org . nuxeo . ecm . directory . Session session = getSession ( ) ) { org . nuxeo . ecm . core . api . DocumentModel entry = session . getEntry ( "user_3" ) ; "<AssertPlaceHolder>" ; } finally { dummyLogin . logout ( ) ; } } getEntry ( K ) { return registr... | org . junit . Assert . assertNotNull ( entry ) |
testInvalidSecondDomainLevelCookieMatch1 ( ) { org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , null ) ; cookie . setDomain ( ".sourceforge.net" ) ; cookie . setAttribute ( ClientCookie . DOMAIN_ATTR , cookie . getDomain ... | org . junit . Assert . assertFalse ( cookiespec . match ( cookie , origin ) ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . mark . scale . type . MarkScaleType context = new org . lnu . is . domain . mark . scale . type . MarkScaleType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>MarkScaleType<sp>e<sp>WHERE<sp>e.crtUserGr... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
test_random_decrease ( ) { int size = 100000 ; org . geolatte . data . PairingHeap < org . geolatte . data . TestPairingHeap . Data > heap = new org . geolatte . data . PairingHeap < org . geolatte . data . TestPairingHeap . Data > ( ) ; java . util . Random random = new java . util . Random ( ) ; java . util . List < ... | org . junit . Assert . assertTrue ( ( ( min . value ) >= ( prev . value ) ) ) |
verifyHasStaticServersIsTrueIfStaticServers ( ) { oracle . kubernetes . operator . wlsconfig . WlsClusterConfig wlsClusterConfig = new oracle . kubernetes . operator . wlsconfig . WlsClusterConfig ( "cluster1" ) ; wlsClusterConfig . addServerConfig ( createWlsServerConfig ( "ms-0" , null , null ) ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( wlsClusterConfig . hasStaticServers ( ) ) |
getBanById ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . ResourcesManagerEntryIntegrationTest . CLASS_NAME ) + "getBanById" ) ) ; vo = setUpVo ( ) ; facility = setUpFacility ( ) ; resource = setUpResource ( ) ; member = setUpMember ( vo ) ; group = setUpGroup ( vo , member ) ; perun . get... | org . junit . Assert . assertEquals ( banOnResource , returnedBan ) |
testStopFail ( ) { org . apache . hadoop . fs . shell . find . Or or = new org . apache . hadoop . fs . shell . find . Or ( ) ; org . apache . hadoop . fs . shell . PathData pathData = mock ( org . apache . hadoop . fs . shell . PathData . class ) ; org . apache . hadoop . fs . shell . find . Expression first = mock ( ... | org . junit . Assert . assertEquals ( Result . STOP , or . apply ( pathData ) ) |
startsWith_A$Seq$int_false ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( 1 , 2 , 3 ) ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > that = com . m3 . scalaflavor4j . IndexedSeq . apply ( 2 , 3 ) ; int offset = 0 ; boolean actual = seq . ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
whenHavingTwoTypesWithTheSameId_theyShouldBeEqual ( ) { com . graphhopper . jsprit . core . problem . vehicle . VehicleTypeImpl type = VehicleTypeImpl . Builder . newInstance ( "type" ) . setCostPerTime ( 10 ) . build ( ) ; com . graphhopper . jsprit . core . problem . vehicle . VehicleTypeImpl type2 = VehicleTypeImpl ... | org . junit . Assert . assertTrue ( type . equals ( type2 ) ) |
testGetInputStreamWithRawData ( ) { java . lang . String message = "message" ; org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest unit = new org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest ( request ) ; java . io . InputStream is = new java . io . ByteArrayInputStr... | org . junit . Assert . assertNotNull ( actual ) |
testGZIPEncodedSpans ( ) { final long traceId = java . util . UUID . randomUUID ( ) . getMostSignificantBits ( ) ; final java . lang . String traceStringId = org . hawkular . apm . server . api . utils . zipkin . ZipkinSpanConvertor . parseSpanId ( traceId ) ; org . hawkular . apm . tests . dist . zipkin . Span span = ... | org . junit . Assert . assertEquals ( traceStringId , trace . getTraceId ( ) ) |
testAddValueMetaNullName ( ) { org . pentaho . di . core . row . ValueMetaInterface vmi = new org . pentaho . di . core . row . value . ValueMetaBase ( ) ; rowMeta . addValueMeta ( vmi ) ; "<AssertPlaceHolder>" ; } getValueMetaList ( ) { java . util . List < org . pentaho . di . core . row . ValueMetaInterface > copy ;... | org . junit . Assert . assertTrue ( rowMeta . getValueMetaList ( ) . contains ( vmi ) ) |
shouldReturnDefaultResultSet ( ) { "<AssertPlaceHolder>" ; } getResultSet ( ) { notClosed ( ) ; return results ; } | org . junit . Assert . assertNull ( stmt . getResultSet ( ) ) |
TestEpochWrite ( ) { java . util . ArrayList < java . lang . Object > stuff = new java . util . ArrayList < java . lang . Object > ( ) ; java . util . Properties proptab = new java . util . Properties ( ) ; proptab . setProperty ( HiveShims . serdeConstants . LIST_COLUMNS , "when" ) ; proptab . setProperty ( HiveShims ... | org . junit . Assert . assertEquals ( ( epoch / day ) , ( ( jn . getLongValue ( ) ) / day ) ) |
testStopWhenEmpty ( ) { org . batfish . datamodel . IpSpace space = org . batfish . datamodel . AclIpSpace . builder ( ) . thenPermitting ( org . batfish . datamodel . Prefix . parse ( "1.2.3.4/32" ) . toIpSpace ( ) ) . thenRejecting ( UniverseIpSpace . INSTANCE ) . thenPermitting ( org . batfish . datamodel . Prefix .... | org . junit . Assert . assertThat ( space , org . hamcrest . Matchers . equalTo ( expected ) ) |
shouldNotResolveAnnotatedIndexOnRootWhenValueIsNull ( ) { org . springframework . data . redis . core . convert . Address address = new org . springframework . data . redis . core . convert . Address ( ) ; address . country = null ; java . util . Set < org . springframework . data . redis . core . convert . IndexedData... | org . junit . Assert . assertThat ( indexes . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
tabShouldBeReturnedByPath ( ) { org . eclipse . che . ide . resource . Path path = new org . eclipse . che . ide . resource . Path ( org . eclipse . che . ide . part . editor . EditorPartStackPresenterTest . SOME_TEXT ) ; when ( editorTab1 . getFile ( ) ) . thenReturn ( file1 ) ; when ( file1 . getLocation ( ) ) . then... | org . junit . Assert . assertEquals ( editorTab1 , presenter . getTabByPath ( path ) ) |
getWallpaperOfSpaceHavingOneShouldReturn1 ( ) { prepareSpaces ( "WA2" , "WA1" , "WA0" ) ; com . silverpeas . look . LookSilverpeasV5Helper lookHelper = aLookSilverpeasV5HelperToTest ( ) ; lookHelper . setSpaceIdAndSubSpaceId ( "WA0" ) ; java . lang . String wallpaper = lookHelper . getWallPaper ( "WA1" ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( "1" , wallpaper ) |
testCriteriaBuilderOrderBy ( ) { org . opennms . core . criteria . CriteriaBuilder cb = new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . model . OnmsNode . class ) ; cb . alias ( "ipInterfaces" , "ipInterface" ) . distinct ( ) ; org . opennms . core . criteria . Criteria criteria = cb . ... | org . junit . Assert . assertEquals ( 6 , nodes . size ( ) ) |
test_getResource_NotFound ( ) { java . lang . Throwable exception = new java . lang . Exception ( ) ; com . webpagebytes . cms . engine . StaticResourceMap resMap = new com . webpagebytes . cms . engine . StaticResourceMap ( ) ; java . util . Map < java . lang . String , byte [ ] > resourceMapContent = org . easymock .... | org . junit . Assert . assertTrue ( ( exception instanceof com . webpagebytes . cms . engine . WPBResourceNotFoundException ) ) |
testDelete_4 ( ) { final java . lang . StringBuilder bottomRef = new java . lang . StringBuilder ( baseString ) ; bottomRef . delete ( 7 , 12 ) ; bottomRef . delete ( 6 , 9 ) ; bottom . delete ( 7 , 12 ) ; bottom . delete ( 6 , 7 ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . format ( "[%s]<... | org . junit . Assert . assertEquals ( bottomRef . toString ( ) , bottom . get ( ) ) |
isEmptyOrNulltrue ( ) { java . lang . String input = "" ; boolean expected = true ; boolean actual = ch07 . StringUtil . isEmptyOrNull ( input ) ; "<AssertPlaceHolder>" ; } isEmptyOrNull ( java . lang . String ) { return ( text == null ) || ( text . isEmpty ( ) ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
dataPointsCollectionShouldBeRecognizedIgnoringStrangeTypes ( ) { java . util . List < org . junit . experimental . theories . PotentialAssignment > assignments = org . junit . tests . experimental . theories . TheoryTestUtils . potentialAssignments ( org . junit . tests . experimental . theories . internal . AllMembers... | org . junit . Assert . assertEquals ( 1 , assignments . size ( ) ) |
testAddBlueprintForDefaults ( ) { java . lang . String result = blueprintCommands . addBlueprint ( ) ; verify ( ambariClient ) . addDefaultBlueprints ( ) ; "<AssertPlaceHolder>" ; } addBlueprint ( ) { java . lang . String message = "Default<sp>blueprints<sp>added" ; try { client . addDefaultBlueprints ( ) ; context . s... | org . junit . Assert . assertEquals ( "Default<sp>blueprints<sp>added" , result ) |
testRemoveProvider ( ) { factory . addZigBeeChannelConverterProvider ( provider ) ; factory . removeZigBeeChannelConverterProvider ( provider ) ; java . util . Collection < org . eclipse . smarthome . core . thing . Channel > channels = factory . getChannels ( thingUID , endpoint ) ; "<AssertPlaceHolder>" ; } getChanne... | org . junit . Assert . assertEquals ( 0 , channels . size ( ) ) |
givenStaticFieldAndUsingOfTypeAndNameThrowsFieldNotFoundExceptionWhenUsingInstance ( ) { org . awaitility . FakeRepositoryWithStaticFieldAndAnnotation repository = new org . awaitility . FakeRepositoryWithStaticFieldAndAnnotation ( ) ; new org . awaitility . Asynch ( repository ) . perform ( ) ; org . awaitility . Awai... | org . junit . Assert . assertEquals ( 1 , repository . getValue ( ) ) |
testAuthenticate_invalidCreds_assertAssertException ( ) { org . nhindirect . common . rest . auth . BasicAuthValidator validator = buildValidator ( ) ; boolean exceptionOccured = false ; try { validator . authenticate ( "gm2552" , "Password" ) ; } catch ( org . nhindirect . common . rest . auth . exceptions . BasicAuth... | org . junit . Assert . assertTrue ( exceptionOccured ) |
tap ( ) { com . gs . collections . api . list . MutableList < java . lang . Integer > tapResult = Lists . mutable . of ( ) ; com . gs . collections . impl . list . Interval interval = com . gs . collections . impl . list . Interval . fromTo ( 10 , ( - 10 ) ) . by ( ( - 5 ) ) ; com . gs . collections . api . LazyIterabl... | org . junit . Assert . assertEquals ( interval , tapResult ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.