input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
retrieveRequest ( ) { org . openmrs . module . fhir . api . client . ClientHttpEntity expected = new org . openmrs . module . fhir . api . client . ClientHttpEntity ( org . springframework . http . HttpMethod . GET , java . net . URI . create ( org . openmrs . module . fhir . api . helper . FHIRClientHelperTest . TEST_... | org . junit . Assert . assertEquals ( expected , fhirClientHelper . retrieveRequest ( org . openmrs . module . fhir . api . helper . FHIRClientHelperTest . TEST_URI ) ) |
testGetDMICMaxSize ( ) { "<AssertPlaceHolder>" ; } getDMICMaxSize ( ) { edu . illinois . library . cantaloupe . script . InvocationCache cache = edu . illinois . library . cantaloupe . script . DelegateProxy . getInvocationCache ( ) ; return cache . maxSize ( ) ; } | org . junit . Assert . assertTrue ( ( ( instance . getDMICMaxSize ( ) ) > 100 ) ) |
testIgnoreIfNever ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testGetImplTypeFlags ( ) { com . sun . jna . platform . win32 . COM . ITypeInfo typeInfo = getTypeInfo ( ) ; com . sun . jna . ptr . IntByReference pImplTypeFlags = new com . sun . jna . ptr . IntByReference ( ) ; com . sun . jna . platform . win32 . WinNT . HRESULT hr = typeInfo . GetImplTypeFlags ( new com . sun . jn... | org . junit . Assert . assertEquals ( 0 , hr . intValue ( ) ) |
testGetAll ( ) { java . util . ArrayList < g7w14 . data . UserBean > users = new java . util . ArrayList < g7w14 . data . UserBean > ( ) ; users = g7w14 . test . UserManagerTest . manager . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { if ( ( ds ) == null ) throw new java . sql . SQLException ( "Can't<sp>get<sp>d... | org . junit . Assert . assertTrue ( ( ( users . size ( ) ) > 0 ) ) |
middleNotIncludedInSubchain ( ) { java . util . ArrayList < java . lang . String > c = new java . util . ArrayList < java . lang . String > ( ) ; c . add ( "123.134.123.213" ) ; c . add ( "1.1.1.1" ) ; c . add ( "3.3.3.3" ) ; com . asquera . elasticsearch . plugins . http . auth . ProxyChain r = new com . asquera . ela... | org . junit . Assert . assertFalse ( r . subchains ( ) . contains ( s ) ) |
testGetNamespacesViaPager ( ) { org . gitlab4j . api . Pager < org . gitlab4j . api . models . Namespace > pager = org . gitlab4j . api . TestNamespaceApi . gitLabApi . getNamespaceApi ( ) . getNamespaces ( 10 ) ; "<AssertPlaceHolder>" ; while ( pager . hasNext ( ) ) { java . util . List < org . gitlab4j . api . models... | org . junit . Assert . assertNotNull ( pager ) |
shouldUpdateOperationViewAndReturnNullIfViewHasNoGroups ( ) { final uk . gov . gchq . gaffer . graph . Graph graph = createGraph ( ) ; final uk . gov . gchq . gaffer . operation . impl . get . GetElements operation = new uk . gov . gchq . gaffer . operation . impl . get . GetElements . Builder ( ) . view ( new uk . gov... | org . junit . Assert . assertNull ( updatedOp ) |
testCancelAfterSettingDelegate ( ) { java . lang . String value = "testCancelAfterSettingDelegate" ; com . ibm . ws . microprofile . faulttolerance20 . impl . FutureShell < java . lang . String > futureShell = new com . ibm . ws . microprofile . faulttolerance20 . impl . FutureShell < java . lang . String > ( ) ; boole... | org . junit . Assert . assertTrue ( canceled ) |
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . TeamPrefChangeEvent event = new com . github . seratch . jslack . api . model . event . TeamPrefChangeEvent ( ) ; java . lang . ... | org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) ) |
testGetByUser ( ) { long userId = 1 ; int status = Status . AGREE . getValue ( ) ; java . util . List < com . xiaomi . shepher . model . UserTeam > userTeams = userTeamMapper . listByUser ( userId , status ) ; "<AssertPlaceHolder>" ; } listByUser ( long , com . xiaomi . shepher . common . Status ) { if ( status == null... | org . junit . Assert . assertEquals ( 2 , userTeams . size ( ) ) |
isAddingTwoGroupsOfOr ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>(r.booleanAttributeTwo<sp>=<sp>true<sp>or<sp>r.longAttributeOne<sp>=<sp>33<sp>or<sp>r.stringAttribute<sp>=<sp>'Just<sp>a<sp>String<sp>03')<sp>and<sp>(r.id<sp>=<sp>1<sp>or<sp>r.id<sp>=<sp>2)" ; final ... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 2 ) ) |
unescapedStringTest ( ) { java . lang . Object defaultValue = constructDefaultValue ( "Monkey" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } constructDefaultValue ( java . lang . Object , java . lang . Class ) { return new io . leangen . graphql . metadata . strategy . value . JsonDefaultValueProvider ( ... | org . junit . Assert . assertEquals ( "Monkey" , defaultValue ) |
testRemove ( ) { org . apache . mina . core . filterchain . DefaultIoFilterChainBuilder builder = new org . apache . mina . core . filterchain . DefaultIoFilterChainBuilder ( ) ; builder . addLast ( "A" , new org . apache . mina . filter . util . NoopFilter ( ) ) ; builder . addLast ( "B" , new org . apache . mina . fi... | org . junit . Assert . assertEquals ( 0 , builder . getAll ( ) . size ( ) ) |
testPoliciesTierLevelTierNameGet ( ) { org . wso2 . carbon . apimgt . rest . api . store . impl . TestUtil . printTestMethodName ( ) ; org . wso2 . carbon . apimgt . rest . api . store . impl . PoliciesApiServiceImpl policiesApiService = new org . wso2 . carbon . apimgt . rest . api . store . impl . PoliciesApiServiceI... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testAssess_underWeight ( ) { double [ ] values1 = new double [ ] { 0.6 , 1 } ; double [ ] values2 = new double [ ] { 1 , 0.6 } ; double [ ] weights = new double [ ] { 1 , 2 } ; int result = org . oscm . app . vmware . business . balancer . EquipartitionHostBalancer . assess ( new double [ ] [ ] { values1 , values2 } , ... | org . junit . Assert . assertTrue ( ( result == 1 ) ) |
testSagaAddedToCacheOnLoad ( ) { org . axonframework . modelling . saga . repository . StubSaga saga = new org . axonframework . modelling . saga . repository . StubSaga ( ) ; testSubject . insertSaga ( org . axonframework . modelling . saga . repository . StubSaga . class , "id" , saga , singleton ( new org . axonfram... | org . junit . Assert . assertSame ( saga , actual . saga ( ) ) |
testGet_callsInstanceCreator ( ) { org . eclipse . rap . rwt . internal . util . SharedInstanceBuffer . InstanceCreator < java . lang . Object , java . lang . Object > instanceCreator = org . eclipse . rap . rwt . internal . util . SharedInstanceBuffer_Test . mockInstanceCreator ( value ) ; java . lang . Object returne... | org . junit . Assert . assertSame ( returnedValue , value ) |
getCompressionTypeTarXFromMetadataSuccess ( ) { when ( obj . getKey ( ) ) . thenReturn ( ( ( ( ( "A" + ( java . io . File . separator ) ) + "File" ) + ( java . io . File . separator ) ) + "XK321K" ) ) ; when ( metadata . getContentType ( ) ) . thenReturn ( "application/x-tar" ) ; final com . amazonaws . codepipeline . ... | org . junit . Assert . assertEquals ( CompressionType . Tar , compressionType ) |
givenPath_whenWriteToItUsingMappedByteBuffer_thenShouldSuccessfullyWrite ( ) { final java . nio . CharBuffer charBuffer = java . nio . CharBuffer . wrap ( "This<sp>will<sp>be<sp>written<sp>to<sp>the<sp>file" ) ; final java . nio . file . Path pathToWrite = getFileURIFromResources ( "fileToWriteTo.txt" ) ; try ( java . ... | org . junit . Assert . assertEquals ( fileContent . get ( 0 ) , "This<sp>will<sp>be<sp>written<sp>to<sp>the<sp>file" ) |
should_put_element_in_cache ( ) { fr . norad . visuwall . providers . common . ResourceCache cache = new fr . norad . visuwall . providers . common . ResourceCache ( ) ; java . lang . Class < java . lang . Object > clazz = java . lang . Object . class ; java . lang . Object object = new java . lang . Object ( ) ; java ... | org . junit . Assert . assertEquals ( object , cache . get ( url , clazz ) ) |
testConstructorInjectionCanDifferentiateDifferentGenericTypesOnProviders ( ) { com . picocontainer . MutablePicoContainer mpc = new com . picocontainer . containers . JSR330PicoContainer ( new com . picocontainer . PicoBuilder ( ) . withCaching ( ) . withJavaEE5Lifecycle ( ) . build ( ) ) ; mpc . addComponent ( com . p... | org . junit . Assert . assertNotNull ( testThree ) |
romaFirenzeDistanceTest ( ) { org . geosdi . geoplatform . support . google . services . DistanceMatrix distanceMatrix = this . gpDistanceMatrixService . getDistanceMatrix ( new java . lang . String [ ] { "Roma" } , new java . lang . String [ ] { "Firenze" } ) . mode ( TravelMode . DRIVING ) . language ( "it" ) . await... | org . junit . Assert . assertNotNull ( distanceMatrix ) |
testGetStorageClass ( ) { when ( mockMojiFile . getStorageClass ( ) ) . thenReturn ( "storage-class" ) ; fm . last . moji . local . LocalMojiFileAttributes attributes = new fm . last . moji . local . LocalMojiFileAttributes ( mockMojiFile ) ; "<AssertPlaceHolder>" ; } getStorageClass ( ) { return mojiFile . getStorageC... | org . junit . Assert . assertThat ( attributes . getStorageClass ( ) , org . hamcrest . CoreMatchers . is ( "storage-class" ) ) |
testWriteOneBatchWithEntityTooLarge ( ) { java . util . Map < java . lang . String , java . util . List < com . amazonaws . services . dynamodbv2 . model . WriteRequest > > batchMap = new java . util . HashMap < java . lang . String , java . util . List < com . amazonaws . services . dynamodbv2 . model . WriteRequest >... | org . junit . Assert . assertEquals ( result . size ( ) , 0 ) |
testGetAllProgramIndicators ( ) { programIndicatorService . addProgramIndicator ( indicatorB ) ; programIndicatorService . addProgramIndicator ( indicatorA ) ; "<AssertPlaceHolder>" ; } getAllProgramIndicators ( ) { return programIndicatorStore . getAll ( ) ; } | org . junit . Assert . assertTrue ( equals ( programIndicatorService . getAllProgramIndicators ( ) , indicatorB , indicatorA ) ) |
shouldParseReadLiteralTextWithMuchPunctuation ( ) { java . lang . String scriptFragment = "read<sp>\"HTTP/1.1<sp>404<sp>Not<sp>Found\\r\\nServer:<sp>Kaazing<sp>Gateway\\r\\n" + ( "Date:<sp>Thu,<sp>03<sp>May<sp>2012<sp>20:41:24<sp>GMT\\r\\n\\r\\nContent-Type:<sp>text/html\\r\\n" + "Content-length:<sp>61<sp><html><head><... | org . junit . Assert . assertEquals ( expected , actual ) |
newChainCanBeStarted ( ) { init ( ) ; org . thingsboard . server . common . data . id . AssetId assetId = new org . thingsboard . server . common . data . id . AssetId ( com . datastax . driver . core . utils . UUIDs . timeBased ( ) ) ; org . thingsboard . server . common . data . id . CustomerId customerId = new org .... | org . junit . Assert . assertEquals ( customerId , originatorCaptor . getValue ( ) ) |
testShouldMimicImposterizedExceptionStackTraceOutput ( ) { original = new java . lang . Exception ( "Detail<sp>message" ) ; original . fillInStackTrace ( ) ; java . lang . RuntimeException imposter = info . novatec . testit . livingdoc . util . ExceptionImposter . imposterize ( original ) ; "<AssertPlaceHolder>" ; } ca... | org . junit . Assert . assertEquals ( captureStackTrace ( original ) , captureStackTrace ( imposter ) ) |
testCreate ( ) { final com . example . domain . Book newBook = new com . example . domain . Book ( ( "book-" + ( java . lang . System . nanoTime ( ) ) ) ) ; javax . ws . rs . core . MediaType contentTypeMediaType = javax . ws . rs . core . MediaType . APPLICATION_XML_TYPE ; javax . ws . rs . core . MediaType acceptMedi... | org . junit . Assert . assertNotNull ( book . getBookId ( ) ) |
testFormResponseObject ( ) { org . apache . asterix . api . http . server . ConnectorApiServlet let = new org . apache . asterix . api . http . server . ConnectorApiServlet ( new java . util . concurrent . ConcurrentHashMap ( ) , new java . lang . String [ ] { ",<sp>" 8 } , ( ( org . apache . asterix . common . dataflo... | org . junit . Assert . assertEquals ( actualResponse . toString ( ) , expectedResponse . toString ( ) ) |
testTestPermissions ( ) { java . util . List < java . lang . Boolean > response = com . google . common . collect . ImmutableList . of ( true , true ) ; java . lang . String getPermission = "resourcemanager.projects.get" ; java . lang . String deletePermission = "resourcemanager.projects.delete" ; expect ( resourceMana... | org . junit . Assert . assertEquals ( response , project . testPermissions ( com . google . common . collect . ImmutableList . of ( getPermission , deletePermission ) ) ) |
testResolveProxyClass ( ) { final java . lang . String interfaceName = "UserDefinedInterface" ; final java . lang . String proxyName = "UserProxy" ; try ( java . net . URLClassLoader userClassLoader = createClassLoader ( interfaceName , proxyName ) ) { java . lang . Class < ? > userInterface = java . lang . Class . for... | org . junit . Assert . assertNotNull ( deserializedProxy ) |
testApp ( ) { long timeoutMS = 1000 ; boolean exitWithoutTimeout = com . ociweb . gl . api . GreenRuntime . testConcurrentUntilShutdownRequested ( new com . ociweb . oe . greenlightning . api . MQTTClient ( "egress" , "ingress" , "testClient42" ) , timeoutMS ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( exitWithoutTimeout ) |
testFileDoesntExist ( ) { org . teiid . resource . adapter . file . FileManagedConnectionFactory fmcf = new org . teiid . resource . adapter . file . FileManagedConnectionFactory ( ) ; fmcf . setParentDirectory ( ( ( org . teiid . core . util . UnitTestUtil . getTestDataPath ( ) ) + "xyz" ) ) ; org . teiid . resource .... | org . junit . Assert . assertNull ( files ) |
newDatabaseShouldHaveNoNodes ( ) { try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { "<AssertPlaceHolder>" ; } } countNodes ( org . neo4j . graphdb . GraphDatabaseService ) { return com . graphaware . common . util . IterableUtils . count ( database . getAllNodes ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , countNodes ( database ) ) |
testGetCrewAssignments ( ) { java . util . List < org . onebusaway . nyc . transit_data_manager . adapters . input . model . MtaUtsCrewAssignment > crewAssignments = inConverter . getCrewAssignments ( ) ; if ( 5 != ( crewAssignments . size ( ) ) ) { for ( org . onebusaway . nyc . transit_data_manager . adapters . input... | org . junit . Assert . assertEquals ( 5 , crewAssignments . size ( ) ) |
testHandles ( ) { java . lang . Object a = createTopLevelObject ( ) ; "<AssertPlaceHolder>" ; java . lang . Class guaranteedNotToBeMappedClass = this . getClass ( ) ; } handles ( java . lang . Class ) { return true ; } | org . junit . Assert . assertTrue ( provider . handles ( a . getClass ( ) ) ) |
testDeleteToken ( ) { com . devopsbuddy . backend . persistence . domain . backend . User user = createUser ( testName ) ; java . lang . String token = java . util . UUID . randomUUID ( ) . toString ( ) ; java . time . LocalDateTime now = java . time . LocalDateTime . now ( java . time . Clock . systemUTC ( ) ) ; com .... | org . junit . Assert . assertNull ( shouldNotExistToken ) |
HavingAndOrderbyTest ( ) { org . verdictdb . sqlreader . RelationStandardizer . resetItemID ( ) ; java . lang . String sql = "select\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "vt1.`ps_partkey`<sp>*<sp>2<sp>as<sp>`groupkey`,<sp>" 5 + "vt1.`ps_partkey`<sp>*<sp>2<sp>as<sp>`groupkey`,<sp>" 7 ) + "group<sp>by\n" 4 ) + "group<sp>by\n... | org . junit . Assert . assertEquals ( expected , actual ) |
getSecond_A$Calendar_0 ( ) { java . lang . Integer expected = 0 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . SECOND , expected ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getSecond ( arg0 ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetSpecificationReference ( ) { org . openscience . cdk . reaction . ReactionSpecification spec = new org . openscience . cdk . reaction . ReactionSpecification ( org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_REF , org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_IMPL_TI... | org . junit . Assert . assertEquals ( org . openscience . cdk . reaction . ReactionSpecificationTest . REAC_REF , spec . getSpecificationReference ( ) ) |
validateValidDataTransfer ( ) { io . motown . ocpp . websocketjson . schema . SchemaValidator validator = new io . motown . ocpp . websocketjson . schema . SchemaValidator ( ) ; boolean validRequest = validator . isValidRequest ( "{\"vendorId\":<sp>\"fr.tm.cnr\",\"messageId\":<sp>\"GetChargeInstruction\",\"data\":<sp>\... | org . junit . Assert . assertTrue ( validRequest ) |
testReRequestAuthenticationIsDisabled ( ) { "<AssertPlaceHolder>" ; } reRequestAuthentication ( org . elasticsearch . rest . RestChannel , com . floragunn . searchguard . user . AuthCredentials ) { return false ; } | org . junit . Assert . assertFalse ( backend . reRequestAuthentication ( null , null ) ) |
insert ( ) { io . confluent . connect . jdbc . util . TableId customers = tableId ( "customers" ) ; java . lang . String expected = "INSERT<sp>INTO<sp>\"customers\"(\"age\",\"firstName\",\"lastName\")<sp>VALUES(?,?,?)" ; java . lang . String sql = dialect . buildInsertStatement ( customers , columns ( customers ) , col... | org . junit . Assert . assertEquals ( expected , sql ) |
testVanJsonNaarObjectNaarJson ( ) { java . lang . String testJsonString = "{\"abonnementNaam\":\"abonnement<sp>y\",\"partijCode\":12345678,\"persoonId\":65431," + "\"referentienummer\":\"12abc\"}" ; nl . bzk . brp . model . internbericht . AfnemerindicatieOnderhoudOpdracht afnemerindicatieOnderhoudOpdracht = jsonString... | org . junit . Assert . assertEquals ( testJsonString , resultaat ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . Phone . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
revocationAndTimestampDelta_shouldBeOneDay ( ) { int oneDayInMinutes = 24 * 60 ; "<AssertPlaceHolder>" ; } getRevocationAndTimestampDeltaInMinutes ( ) { return this . getConfigurationParameter ( ConfigurationParameter . RevocationAndTimestampDeltaInMinutes , org . digidoc4j . Integer . class ) ; } | org . junit . Assert . assertEquals ( oneDayInMinutes , this . configuration . getRevocationAndTimestampDeltaInMinutes ( ) ) |
trimAll_A$String_notNull ( ) { org . junithelper . core . filter . impl . TrimQuotationFilter target = new org . junithelper . core . filter . impl . TrimQuotationFilter ( ) ; java . lang . String src = "sdfa\"sdfsf\'a\r\naaa\'asdfsfa\"aaa" ; java . lang . String actual = target . trimAll ( src ) ; java . lang . String... | org . junit . Assert . assertEquals ( expected , actual ) |
testScalarAdd ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiff = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable twoByTwo = sameDiff . var ( "first" , org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) . reshape ( 'c' , 2 , 2 ) ) ; org . nd4j... | org . junit . Assert . assertEquals ( assertion , test ) |
testComparison ( ) { io . quantumdb . core . versioning . ChangeSet oldest = new io . quantumdb . core . versioning . ChangeSet ( "test" , "Michael<sp>de<sp>Jong" ) ; java . lang . Thread . sleep ( 100 ) ; io . quantumdb . core . versioning . ChangeSet newest = new io . quantumdb . core . versioning . ChangeSet ( "test... | org . junit . Assert . assertEquals ( ( - 1 ) , oldest . compareTo ( newest ) ) |
calling_java_varargs_2nd_argument ( ) { final bsh . Interpreter interpreter = new bsh . Interpreter ( ) ; interpreter . set ( "helper" , new bsh . VarargsTest . ClassWithVarargMethods ( ) ) ; @ bsh . SuppressWarnings ( { "unchecked" } ) final java . util . List < java . lang . Object > list = ( ( java . util . List < j... | org . junit . Assert . assertEquals ( java . util . Arrays . < java . lang . Object > asList ( 1 , 2 , 3 ) , list ) |
test_get_all_configuration_service_clients_success ( ) { java . util . List < org . ikasan . mapping . dao . ConfigurationServiceClient > result = this . xaMappingConfigurationDao . getAllConfigurationServiceClients ( ) ; "<AssertPlaceHolder>" ; } size ( ) { logger . debug ( "Size!<sp>" ) ; return 15000 ; } | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
putIfAbsent_NullKey ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>key<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } } putIfAbsent ( K , V ) { return new Semantic . UpdateExisting < K , V , java . lang . Boolea... | org . junit . Assert . assertFalse ( cache . putIfAbsent ( null , "" ) ) |
convertsIdSelectionOptionsWhenIdOptions ( ) { com . khartec . waltz . model . IdSelectionOptions options = com . khartec . waltz . model . ImmutableIdSelectionOptions . builder ( ) . entityReference ( com . khartec . waltz . model . EntityReference . mkRef ( EntityKind . ORG_UNIT , 1 ) ) . scope ( HierarchyQueryScope .... | org . junit . Assert . assertEquals ( targetAppOptions , convertedOptions ) |
testSize ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createFloat4 ( 5.0F ) ; "<AssertPlaceHolder>" ; } size ( ) { return taskRequestQueue . size ( ) ; } | org . junit . Assert . assertEquals ( 4 , d . size ( ) ) |
testRoundTripTranscoding_map ( ) { final java . lang . reflect . Type type = new com . google . common . reflect . TypeToken < java . util . Map < java . lang . String , java . lang . Integer > > ( ) { } . getType ( ) ; final com . outbrain . ob1k . cache . memcache . folsom . MessagePackTranscoder < java . util . Map ... | org . junit . Assert . assertEquals ( map , decodedMap ) |
indexOf ( ) { super . indexOf ( ) ; org . eclipse . collections . api . list . MutableList < java . lang . Integer > objects = this . newWith ( 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { int result = 0 ; for ( int i = 0 ; i < ( this . elements . length ) ; i ++ ) { if ( object . equals (... | org . junit . Assert . assertEquals ( 1 , objects . indexOf ( 2 ) ) |
test3 ( ) { nopol_examples . nopol_example_3 . NopolExample ex = new nopol_examples . nopol_example_3 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isOddNumber ( int ) { int tmp = ( a - 1 ) % 2 ; if ( tmp != 0 ) { return true ; } return false ; } | org . junit . Assert . assertTrue ( ex . isOddNumber ( ( - 1 ) ) ) |
testFindDate ( ) { java . text . DateFormat dfm = new java . text . SimpleDateFormat ( "yyyyMMdd" ) ; java . util . Date date1 = new java . util . Date ( dfm . parse ( "20110101" ) . getTime ( ) ) ; java . util . Date date2 = new java . util . Date ( dfm . parse ( "20010101" ) . getTime ( ) ) ; java . util . Date date3... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testGetReplyUrl ( ) { when ( mockS3Client . generatePresignedUrl ( org . mockito . Mockito . any ( com . amazonaws . services . s3 . model . GeneratePresignedUrlRequest . class ) ) ) . thenReturn ( url ) ; java . lang . String url = dao . getReplyUrl ( "1/2/3/key" ) . getMessageUrl ( ) ; "<AssertPlaceHolder>" ; } getRe... | org . junit . Assert . assertNotNull ( url ) |
testConverteerStringWaarde ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . PERSOON_NAAMGEBRUIK_GESLACHTSNAAMSTAM ) ; final java . lang . String waarde = "jansen" ; final java . lang . Object waardeGeconverteerd = zoekCriteriaConverteerService . convert... | org . junit . Assert . assertEquals ( waarde , waardeGeconverteerd ) |
testOutputScript1 ( ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = webClient . getPage ( ( ( webUrl ) + "/faces/outputTextScript1.xhtml" ) ) ; com . gargoylesoftware . htmlunit . html . HtmlTextArea input = ( ( com . gargoylesoftware . htmlunit . html . HtmlTextArea ) ( page . getElementById ( "testForm... | org . junit . Assert . assertTrue ( input . getText ( ) . contains ( inputValue ) ) |
reversePathsWithWildcard ( ) { long r = execute ( "/root//b/parent::*[b<sp>=<sp>'two']" , false ) ; "<AssertPlaceHolder>" ; execute ( "/root//b/parent::*[b<sp>=<sp>'two']" , true , org . exist . xquery . OptimizerTest . MSG_OPT_ERROR , r ) ; } execute ( java . lang . String , boolean ) { org . xmldb . api . modules . X... | org . junit . Assert . assertEquals ( 1 , r ) |
testHistoricTaskInstanceDurationReportQuery ( ) { startAndCompleteProcessInstance ( org . camunda . bpm . engine . test . history . HistoricTaskDurationReportTest . PROCESS_DEFINITION_KEY , 2016 , 6 , 14 , 11 , 43 ) ; startAndCompleteProcessInstance ( org . camunda . bpm . engine . test . history . HistoricTaskDuration... | org . junit . Assert . assertEquals ( 3 , taskReportResults . size ( ) ) |
write_ORGtparts ( ) { if ( ! ( isJp2KakDriverAvailable ) ) return ; it . geosolutions . imageio . plugins . jp2kakadu . JP2KWriteTest . LOGGER . info ( "ImageWrite" 2 ) ; final java . io . File inputFile = it . geosolutions . resources . TestData . file ( this , it . geosolutions . imageio . plugins . jp2kakadu . JP2KW... | org . junit . Assert . assertTrue ( inputFile . exists ( ) ) |
testGetAddress_1 ( ) { final org . cloudifysource . esc . driver . provisioning . jclouds . CloudAddressResolver fixture = new org . cloudifysource . esc . driver . provisioning . jclouds . CloudAddressResolver ( ) ; final java . util . Set < java . lang . String > addresses = new java . util . HashSet ( java . util . ... | org . junit . Assert . assertEquals ( "10.4.12.1" , result ) |
testPassSerializable0 ( ) { java . util . Date date = new java . util . Date ( ) ; java . util . ArrayList < org . jacorb . test . orb . rmi . ObjectParam > list = new java . util . ArrayList < org . jacorb . test . orb . rmi . ObjectParam > ( ) ; org . jacorb . test . orb . rmi . ObjectParam param = new org . jacorb .... | org . junit . Assert . assertEquals ( param . payload , ( ( org . jacorb . test . orb . rmi . ObjectParam ) ( result . get ( 0 ) ) ) . payload ) |
handleGetObject_Cache ( ) { doReturn ( brMock ) . when ( dbm ) . getBrandManagementService ( any ( org . oscm . ui . common . ServiceAccess . class ) ) ; doReturn ( lsMock ) . when ( dbm ) . getLocalizedDataService ( any ( org . oscm . ui . common . ServiceAccess . class ) ) ; java . util . Properties properties = new ... | org . junit . Assert . assertEquals ( "value" , value ) |
testRenewDelegationTokenOnHA ( ) { org . apache . hadoop . yarn . api . protocolrecords . RenewDelegationTokenRequest request = org . apache . hadoop . yarn . api . protocolrecords . RenewDelegationTokenRequest . newInstance ( cluster . createFakeToken ( ) ) ; long newExpirationTime = org . apache . hadoop . yarn . cli... | org . junit . Assert . assertEquals ( newExpirationTime , cluster . createNextExpirationTime ( ) ) |
getUserWithNull ( ) { org . phenotips . data . permissions . Owner o = new org . phenotips . data . permissions . internal . DefaultOwner ( null , this . helper ) ; "<AssertPlaceHolder>" ; } getUser ( ) { org . phenotips . data . permissions . Collaborator c = new org . phenotips . data . permissions . internal . Defau... | org . junit . Assert . assertNull ( o . getUser ( ) ) |
testNoTypeField ( ) { org . jivesoftware . smackx . FormField field = new org . jivesoftware . smackx . FormField ( "abc<sp>def" ) ; field . addValue ( org . apache . vysper . console . HtmlFormBuilderTest . VALUE1 ) ; form . addField ( field ) ; java . lang . String actual = builder . build ( form ) ; java . lang . St... | org . junit . Assert . assertEquals ( expected , actual ) |
testCheckPreFlightRequestTypeEmptyACRM ( ) { org . ebaysf . web . cors . MockHttpServletRequest request = new org . ebaysf . web . cors . MockHttpServletRequest ( ) ; request . setHeader ( CORSFilter . REQUEST_HEADER_ORIGIN , TestConfigs . HTTP_TOMCAT_APACHE_ORG ) ; request . setHeader ( CORSFilter . REQUEST_HEADER_ACC... | org . junit . Assert . assertEquals ( CORSFilter . CORSRequestType . INVALID_CORS , requestType ) |
setReplicationNegativeMax ( ) { alluxio . client . file . FileSystemTestUtils . createByteFile ( mFileSystem , alluxio . client . cli . fs . command . SetReplicationCommandTest . TEST_FILE , WritePType . MUST_CACHE , 10 ) ; int ret = mFsShell . run ( "setReplication" , "-max" , "-2" , alluxio . client . cli . fs . comm... | org . junit . Assert . assertEquals ( ( - 1 ) , ret ) |
collectBoolean ( ) { org . eclipse . collections . api . list . primitive . BooleanList expected = org . eclipse . collections . impl . collector . Collectors2AdditionalTest . SMALL_INTERVAL . collectBoolean ( ( each ) -> ( each % 2 ) == 0 , BooleanLists . mutable . empty ( ) ) ; org . eclipse . collections . api . lis... | org . junit . Assert . assertEquals ( expected , actual ) |
testFileWithPathComponentsNullParameter ( ) { java . io . File result = org . mule . runtime . core . internal . util . FilenameUtils . fileWithPathComponents ( null ) ; "<AssertPlaceHolder>" ; } fileWithPathComponents ( java . lang . String [ ] ) { if ( pathComponents == null ) { return null ; } java . lang . StringBu... | org . junit . Assert . assertNull ( result ) |
testGraph ( ) { "<AssertPlaceHolder>" ; } graph ( ) { return graph ; } | org . junit . Assert . assertEquals ( g , graph . graph ( ) ) |
testDestroy ( ) { tested . setView ( view ) ; tested . destroy ( ) ; verify ( handlerRegistrationManager , times ( 1 ) ) . destroy ( ) ; verify ( view , times ( 1 ) ) . destroy ( ) ; "<AssertPlaceHolder>" ; } getView ( ) { return delegate . getView ( ) ; } | org . junit . Assert . assertNull ( tested . getView ( ) ) |
canDownloadFile ( ) { retrofit2 . Retrofit retrofit = new retrofit2 . Retrofit . Builder ( ) . baseUrl ( "http://microsoft.com" ) . addCallAdapterFactory ( retrofit2 . adapter . rxjava . RxJavaCallAdapterFactory . create ( ) ) . build ( ) ; byte [ ] content = com . microsoft . azure . management . resources . fluentcor... | org . junit . Assert . assertNotNull ( contentString ) |
testHybridisationSp3d2F ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( HYBRIDISATION_NUMBER , 5 ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; when ( atom . getHyb... | org . junit . Assert . assertFalse ( expr . matches ( atom ) ) |
two_$parent_contains_none_returns_true_when_expression_values_not_in_array ( ) { com . redhat . lightblue . query . QueryExpression expr = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field6.nf7.nnf1.$parent.$parent.nf5',<sp>'contains':'$none',<sp>'values':[1,2,3,4]}" ) ; com... | org . junit . Assert . assertTrue ( context . getResult ( ) ) |
testDocumentIndexingOptionUpdate ( ) { host . startFactory ( new com . vmware . xenon . common . ExampleDocumentIndexingOptionsService ( ) ) ; java . net . URI uri = com . vmware . xenon . common . UriUtils . buildUri ( this . host , com . vmware . xenon . common . ExampleDocumentIndexingOptionsService . FACTORY_LINK )... | org . junit . Assert . assertEquals ( "example1" , serviceState . name ) |
testHaalPersoonOp ( ) { final javax . persistence . TypedQuery typedQueryMock = mock ( javax . persistence . TypedQuery . class ) ; when ( entityManager . createQuery ( anyString ( ) , eq ( nl . bzk . brp . model . operationeel . kern . PersoonCacheModel . class ) ) ) . thenReturn ( typedQueryMock ) ; when ( typedQuery... | org . junit . Assert . assertNotNull ( resultaat ) |
shouldLoadAllColumnQualifierPropertiesWhenGetGroupByProperty ( ) { final java . lang . String group = uk . gov . gchq . gaffer . commonutil . TestGroups . EDGE ; final org . apache . accumulo . core . data . Key key = mock ( org . apache . accumulo . core . data . Key . class ) ; final org . apache . accumulo . core . ... | org . junit . Assert . assertEquals ( "propValue1" , property ) |
testQueryOne ( ) { com . xkcoding . orm . mybatis . MapperAndPage . entity . User user = userMapper . selectByPrimaryKey ( 1L ) ; "<AssertPlaceHolder>" ; log . debug ( "user=<sp>{}" , user ) ; } | org . junit . Assert . assertNotNull ( user ) |
testDecorationOfInstantatedInstanceAlsoReceivesProperInstantiationOrdering ( ) { com . picocontainer . injectors . CompositeInjectionTestCase . CompositeOrderBase . one = null ; com . picocontainer . injectors . CompositeInjectionTestCase . CompositeOrderDerived . two = null ; com . picocontainer . DefaultPicoContainer... | org . junit . Assert . assertNotNull ( adapter ) |
testMergeJoinMultiWayNone2 ( ) { org . apache . rya . api . domain . RyaIRI pred = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . MergeJoinTest . litdupsNS , "pred1" ) ; org . apache . rya . api . domain . RyaType zero = new org . apache . rya . api . domain . RyaType ( "0" ) ; org . apache . rya... | org . junit . Assert . assertFalse ( join . hasNext ( ) ) |
test_param_string_positional_injection_09 ( ) { java . lang . String str = "PREFIX<sp>:<sp><http://example/>\nINSERT<sp>DATA<sp>{<sp><s><sp><p><sp>?<sp>}" ; org . apache . jena . query . ParameterizedSparqlString pss = new org . apache . jena . query . ParameterizedSparqlString ( str ) ; pss . setLiteral ( 0 , "\"<sp>.... | org . junit . Assert . assertEquals ( 1 , updates . getOperations ( ) . size ( ) ) |
testViewDetailTemplateIsMock ( ) { com . ewcms . publication . freemarker . preview . PreviewService service = newPreviewServiceMock ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; service . viewDetailTemplate ( out , new com . ewcms . core . site . model . Site ( ) , new com .... | org . junit . Assert . assertTrue ( ( ( out . size ( ) ) > 0 ) ) |
getRectangle3 ( ) { final edu . illinois . library . cantaloupe . operation . ReductionFactor rf = new edu . illinois . library . cantaloupe . operation . ReductionFactor ( 2 ) ; final edu . illinois . library . cantaloupe . image . Dimension reducedSize = new edu . illinois . library . cantaloupe . image . Dimension (... | org . junit . Assert . assertEquals ( new edu . illinois . library . cantaloupe . image . Rectangle ( 50 , 0 , 200 , 200 ) , crop . getRectangle ( reducedSize , rf , scaleConstraint ) ) |
testCreateThriftTwoSource ( ) { "<AssertPlaceHolder>" ; } createThriftTwoSource ( ) { if ( ( org . apache . hadoop . hbase . thrift . MetricsThriftServerSourceFactoryImpl . FactoryStorage . INSTANCE . thriftTwo ) == null ) { org . apache . hadoop . hbase . thrift . MetricsThriftServerSourceFactoryImpl . FactoryStorage ... | org . junit . Assert . assertSame ( new org . apache . hadoop . hbase . thrift . MetricsThriftServerSourceFactoryImpl ( ) . createThriftTwoSource ( ) , new org . apache . hadoop . hbase . thrift . MetricsThriftServerSourceFactoryImpl ( ) . createThriftTwoSource ( ) ) |
testSetUriRuleParameters ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "o" , "test" ) ; com . ewcms . publication . uri . UriRuleable rule = com . ewcms . publication . uri . UriRule... | org . junit . Assert . assertEquals ( "test" , rule . getUri ( ) ) |
testFindFolders ( ) { final int count = 10 ; java . util . List < java . lang . String > ids = new java . util . ArrayList < java . lang . String > ( count ) ; com . microsoft . schemas . exchange . services . x2006 . types . FolderType [ ] folders = new com . microsoft . schemas . exchange . services . x2006 . types .... | org . junit . Assert . assertEquals ( ids . get ( folderCount ) , folder ) |
testFindPrimaryReferenceSingleChildOfSpanContext ( ) { io . opentracing . Tracer tracer = new org . hawkular . apm . client . opentracing . APMTracer ( ) ; io . opentracing . SpanContext spanCtx = extractSpanContext ( tracer , io . opentracing . impl . APMSpanTest . TEST_APM_ID1 ) ; io . opentracing . impl . AbstractSp... | org . junit . Assert . assertEquals ( ref , io . opentracing . impl . APMSpan . findPrimaryReference ( java . util . Arrays . asList ( ref ) ) ) |
testAddRemoveEntries ( ) { org . apache . hadoop . oncrpc . RpcCallCache cache = new org . apache . hadoop . oncrpc . RpcCallCache ( "test" , 100 ) ; java . net . InetAddress clientIp = java . net . InetAddress . getByName ( "1.1.1.1" ) ; int xid = 100 ; org . apache . hadoop . oncrpc . RpcCallCache . CacheEntry e = ca... | org . junit . Assert . assertNull ( e ) |
test_ax_by ( ) { org . antlr . v4 . runtime . atn . PredictionContext a = createSingleton ( x ( false ) , 1 ) ; org . antlr . v4 . runtime . atn . PredictionContext b = createSingleton ( y ( false ) , 2 ) ; org . antlr . v4 . runtime . atn . PredictionContext r = contextCache . join ( a , b ) ; System . out . println (... | org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) |
testExtractCauseFrom_InvocationTargetException ( ) { final org . adempiere . exceptions . AdempiereException expectedCause = newAdempiereException ( ) ; final java . lang . Throwable actualCause = org . adempiere . exceptions . AdempiereException . extractCause ( new java . lang . reflect . InvocationTargetException ( ... | org . junit . Assert . assertSame ( expectedCause , actualCause ) |
testOnPlayerHitItemFrame ( ) { org . bukkit . entity . ItemFrame itemFrame = mock ( org . bukkit . entity . ItemFrame . class ) ; when ( itemFrame . getType ( ) ) . thenReturn ( EntityType . ITEM_FRAME ) ; when ( itemFrame . getLocation ( ) ) . thenReturn ( location ) ; org . bukkit . event . player . PlayerInteractEnt... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
testEncodeFirstTransformation ( ) { java . lang . String encodedString = org . apache . johnzon . core . JsonPointerUtil . encode ( "~" ) ; "<AssertPlaceHolder>" ; } encode ( java . lang . String ) { if ( ( s == null ) || ( ( s . length ( ) ) == 0 ) ) { return s ; } return s . replace ( "~" , "~0" ) . replace ( "/" , "... | org . junit . Assert . assertEquals ( "~0" , encodedString ) |
testAddGroupBy ( ) { org . springframework . data . solr . core . query . Query query = new org . springframework . data . solr . core . query . SimpleQuery ( ) . addGroupByField ( new org . springframework . data . solr . core . query . SimpleField ( "field_1" ) ) . addGroupByField ( new org . springframework . data .... | org . junit . Assert . assertEquals ( 2 , ( ( java . util . List ) ( query . getGroupByFields ( ) ) ) . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.